Permalink
Browse files

Testsuite updates; run it as part of CI builds.

Only can run a quick build because of Travis time restrictions. Should
try to find a set of most-likely-to-fail command line args, maybe
"-O -gc -fPIC"?
  • Loading branch information...
1 parent 5e03034 commit c0980de3afc0e5785e069dcfdd7068ca5581a95e @klickverbot klickverbot committed Sep 29, 2012
Showing with 25 additions and 1 deletion.
  1. +1 −0 .travis.yml
  2. +8 −0 CMakeLists.txt
  3. +15 −0 tests/d2/CMakeLists.txt
  4. +1 −1 tests/d2/dmd-testsuite
View
@@ -11,6 +11,7 @@ before_script:
script:
- cmake -DD_VERSION=$DVER -DLLVM_CONFIG=/usr/bin/llvm-config-3.0
- make
+ - make test || { cat Testing/Temporary/LastTest.log; exit 1; }
notifications:
email:
View
@@ -339,3 +339,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(DIRECTORY bash_completion.d DESTINATION ${CONF_INST_DIR})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+
+#
+# Test targets.
+#
+enable_testing()
+if(D_VERSION EQUAL 2)
+ add_subdirectory(tests/d2)
+endif()
View
@@ -0,0 +1,15 @@
+include(CheckTypeSize)
+check_type_size(void* ptr_size)
+if(${ptr_size} MATCHES "^4$")
+ set(model 32)
+elseif(${ptr_size} MATCHES "^8$")
+ set(model 64)
+endif()
+
+set(DMD_TEST_MODEL "${model}" CACHE STRING
+ "The model argument to use for compiling the D2 testsuite. Defaults to system bitness.")
+
+get_property(ldmd_path TARGET ldmd2 PROPERTY LOCATION)
+
+add_test(NAME dmd-testsuite WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests/d2/dmd-testsuite
+ COMMAND make RESULTS_DIR=${CMAKE_BINARY_DIR}/dmd_test_results DMD=${ldmd_path} MODEL=${DMD_TEST_MODEL} quick)

0 comments on commit c0980de

Please sign in to comment.