Commit eeadf2f4 authored by Sarah Spall's avatar Sarah Spall Committed by Vikram Narayanan

fixed bug where out files were not absolute paths

parent fbd556fe
......@@ -16,17 +16,16 @@
(define test-cases
;; (with-handlers ([exn:fail? (lambda (exn) '())])
(map (lambda (p)
(build-path (current-directory) p))
(map (lambda (path)
(build-path (current-directory) path))
(find-files is-test-case? #f)))
(define (run-server-header-test tests)
(if (empty? tests)
(displayln "no tests")
(let* ([test (path->string (car tests))]
[out-file (apply build-path (reverse (cons (string-append (car (reverse (string-split test "/")))
"server.h")
(cdr (reverse (string-split test "/"))))))])
[out-file (build-path (current-directory) "test_cases" (string-append (car (reverse (string-split test "/")))
".server.h"))])
(displayln `(server header test: ,test) (current-error-port))
(system* exec "-serverheader" test out-file))))
......@@ -35,9 +34,8 @@
(if (empty? tests)
(displayln "no tests")
(let* ([test (path->string (car tests))]
[out-file (apply build-path (reverse (cons (string-append (car (reverse (string-split test "/")))
"server.c")
(cdr (reverse (string-split test "/"))))))])
[out-file (build-path (current-directory) "test_cases" (string-append (car (reverse (string-split test "/")))
".server.c"))])
(displayln `(server source test: ,test) (current-error-port))
(system* exec "-serversource" test out-file))))
......@@ -45,9 +43,8 @@
(if (empty? tests)
(void)
(let* ([test (path->string (car tests))]
[out-file (apply build-path (reverse (cons (string-append (car (reverse (string-split test "/")))
"client.h")
(cdr (reverse (string-split test "/"))))))])
[out-file (build-path (current-directory) "test_cases" (string-append (car (reverse (string-split test "/")))
".client.h"))])
(displayln `(client header test: ,test) (current-error-port))
(system* exec "-clientheader" test out-file))))
......@@ -55,21 +52,21 @@
(if (empty? tests)
(void)
(let* ([test (path->string (car tests))]
[out-file (apply build-path (reverse (cons (string-append (car (reverse (string-split test "/")))
"client.c")
(cdr (reverse (string-split test "/"))))))])
[out-file (build-path (current-directory "test_cases" (string-append (car (reverse (string-split test "/")))
".client.c")))])
(displayln `(client source test: ,test) (current-error-port))
(system* exec "-clientsource" test out-file))))
(define (run-tests tests)
(displayln "Running server header test")
(run-server-header-test tests)
(run-server-header-test tests))
#|
(displayln "Running server source test")
(run-server-source-test tests)
(displayln "Running client header test")
(run-client-header-test tests)
(displayln "Running client source test")
(run-client-source-test tests))
(run-client-source-test tests)) |#
(run-tests test-cases)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment