X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=SConscript.test;fp=SConscript.test;h=28ddfd7b3ecf5490c0476897a0eac372383849a8;hb=22de17136c8c5692e83d5d15ce09528d9afd3e13;hp=0000000000000000000000000000000000000000;hpb=b891a2ff44e99392e258c2f39ec0852c4b5dbfab;p=gps-watch.git diff --git a/SConscript.test b/SConscript.test new file mode 100644 index 0000000..28ddfd7 --- /dev/null +++ b/SConscript.test @@ -0,0 +1,29 @@ +Import('env') +env = env.Clone() + +env.Append(RUSTCFLAGS = [ + '-g', + '-C', 'opt-level=s', +]) + +SConscript('SConscript.libcommon.rs', exports='env', duplicate=0) + +test_source_files = [ + 'test/main.rs', # Must be listed first (see below). +] + +test_env = env.Clone() + +test_env.Append(RUSTCFLAGS = [ + '-L', '$LIBPATH', + '--test', +]) + +test = test_env.Rustc('gps-watch-test', test_source_files[0]) + +for f in test_source_files: + Depends(test, f) + +Depends(test, 'libcommon.rlib') + +Default(test)