summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
authorMartin Ebourne <martin@ebourne.me.uk>2005-12-28 13:31:41 +0000
committerMartin Ebourne <martin@ebourne.me.uk>2005-12-28 13:31:41 +0000
commit47855adf7bd3a2552dc1c0b0998a55e0049ce2ab (patch)
tree9529faf7cc25de47e7f0c331391720946327cb38 /infrastructure
parentc47cb9914c7ae7586c1d5d6f1b4970ab6bde448f (diff)
Removed dynamic tests, not used since autoconf
Diffstat (limited to 'infrastructure')
-rw-r--r--infrastructure/tests/common_tests.pl194
1 files changed, 0 insertions, 194 deletions
diff --git a/infrastructure/tests/common_tests.pl b/infrastructure/tests/common_tests.pl
deleted file mode 100644
index 04a0ae30..00000000
--- a/infrastructure/tests/common_tests.pl
+++ /dev/null
@@ -1,194 +0,0 @@
-
-# perl fragment, not directly runnable
-
-{
- # test for a C++ compiler
- do_test('Name' => 'Compiler 1',
- 'AbortOnFailure' => 1,
- 'FailureText' => <<__E,
-
-================
-
-You do not appear to have the g++ compiler installed. Please fix and try again.
-(Tested for C++ compilation and use of standard STL C++ library.)
-
-Some distributions rename the g++ compiler to something including the version number,
-and fail to create a symlink to the expected name. Investigate this if you believe
-you have the C++ compiler installed.
-
-================
-
-__E
- 'Code' => <<__E);
-#include <string>
-int main(int argc, char *argv[])
-{
- std::string str;
- str = "Test";
- str += "_test";
-}
-__E
-
- # test for a properly working C++ compiler
- do_test('Name' => 'Compiler 2',
- 'AbortOnFailure' => 1,
- 'RunCode' => 1,
- 'FailureText' => <<__E,
-
-================
-
-The C++ compiler fails basic C++ tests. It is impossible to compile and deploy this
-software on this platform.
-
-Some less common platforms do not have a working C++ implementation, especially
-regarding modern language features such as exceptions. A basic test failed. It is
-unlikely that you will be able to use this software without fixing the compiler.
-
-You could try a later version of the compiler, if available.
-
-================
-
-__E
- 'Code' => <<__E);
-#include <string>
-class test_class
-{
-public:
- test_class(const char *str) : mString(str) {}
- ~test_class() {}
-private:
- std::string mString;
-};
-int main(int argc, char *argv[])
-{
- try
- {
- throw test_class("Test exception");
- }
- catch(test_class &e)
- {
- return 0;
- }
- return 1;
-}
-__E
-
- # test for any version of OpenSSL
- do_test('Name' => 'OpenSSL 1',
- 'SuccessFlags' => ['OLD_OPENSSL_OK'],
- 'TestCompileFlags' => '-lcrypto ',
- 'Code' => <<__E);
-#include <openssl/evp.h>
-int main(int argc, char *argv[])
-{
- EVP_CipherInit(0, 0, 0, 0, 0);
- return 0;
-}
-__E
-
- # test for new version of OpenSSL
- do_test('Name' => 'OpenSSL 2',
- 'SuccessFlags' => ['OPENSSL_OK'],
- 'TestCompileFlags' => '-lcrypto ',
- 'Code' => <<__E);
-#include <openssl/evp.h>
-int main(int argc, char *argv[])
-{
- EVP_CipherInit_ex(0, 0, 0, 0, 0, 0);
- return 0;
-}
-__E
-
- # Linux is always more fun
- if($build_os eq 'Linux')
- {
- # see if curses is available
- sub curses_test
- {
- my $c = $_[0];
- do_test('Name' => $c,
- 'SuccessFlags' => [$c.'_PRESENT'],
- 'TestCompileFlags' => '-l'.$c.' ',
- 'Code' => <<__E);
-#include <curses.h>
-int main(int argc, char *argv[])
-{
- initscr(); cbreak(); noecho();
- nonl();
- intrflush(stdscr, 0);
- keypad(stdscr, 0);
- return 0;
-}
-__E
- }
- curses_test('curses');
- curses_test('ncurses');
-
- # see if LFS support is available
- do_test('Name' => 'Linux LFS support',
- 'RunCode' => 1,
- 'TestCompileFlags' => '-D_FILE_OFFSET_BITS=64 ',
- 'SuccessCompileFlags' => '-D_FILE_OFFSET_BITS=64',
- 'Code' => <<__E);
-#include <sys/types.h>
-#include <sys/stat.h>
-int main(int argc, char *argv[])
-{
- struct stat st;
- if(sizeof(st.st_size) == 8 && sizeof(off_t) == 8)
- {
- return 0;
- }
- return 1;
-}
-__E
-
- # see if FS extended attributes support is available
- do_test('Name' => 'Linux XATTR support',
- 'RunCode' => 0,
- 'SuccessCompileFlags' => '-DPLATFORM_HAVE_XATTR',
- 'Code' => <<__E);
-#include <cstdlib>
-#include <sys/types.h>
-#include <sys/xattr.h>
-int main(int argc, char *argv[])
-{
- const char* filename = "file";
- listxattr(filename, NULL, 0);
- return 0;
-}
-__E
-
- }
-
- # USE_MALLOC doesn't work on some < gcc3 platforms
- if(!$gcc_v3)
- {
- do_test('Name' => 'USE_MALLOC',
- 'FailureCompileFlags' => '-DPLATFORM_STL_USE_MALLOC_BROKEN',
- 'FailureText' => <<__E,
-
-================
-WARNING: The implementation of the C++ STL on this platform may have a flaw
-which causes it to apparently leak memory, and this flaw cannot be worked
-around.
-
-When running the daemons, check their memory usage does not constantly
-increase. The STL flaw can cause excessive memory use.
-================
-
-__E
- 'Code' => <<__E);
-#define __USE_MALLOC
-#include <string>
-int main(int argc, char *argv[])
-{
- std::string s;
- s = "test";
-}
-__E
- }
-}
-
-
-1;