Skip to content

Commit

Permalink
build: Add make test target (not working correctly)
Browse files Browse the repository at this point in the history
  • Loading branch information
okuoku committed Jul 12, 2016
1 parent d494bab commit 70c16bd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,21 @@ message(STATUS "gsc(RAPID_GAMBIT_GSC) = ${RAPID_GAMBIT_GSC}")
message(STATUS "larceny(RAPID_GAMBIT_LARCENY) = ${RAPID_GAMBIT_LARCENY}")
message(STATUS "")


# Tests

enable_testing()

function(add_testrun nam src wrkdir)
add_test(NAME ${nam}
COMMAND ${RAPID_GAMBIT}
-I ${RAPID_SCHEME_ROOT} -I ${RAPID_SCHEME_ROOT}/share
${src}
WORKING_DIRECTORY ${wrkdir})
endfunction()

add_testrun(trivial ${CMAKE_CURRENT_LIST_DIR}/tests/trivial.scm
${CMAKE_CURRENT_BINARY_DIR})
add_testrun(rapid-scheme-test ${RAPID_SCHEME_ROOT}/tests.scm
${RAPID_SCHEME_ROOT})

4 changes: 4 additions & 0 deletions tests/trivial.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(import (scheme base)
(scheme write))

(display "Hello.\n")

0 comments on commit 70c16bd

Please sign in to comment.