1 // Copyright ArcCore AB
\r
4 // A simple testscript that runs all the test-suite located in the
\r
5 // system/kernel/testsystem folder (it looks for the binaries in
\r
6 // the "binaries" folder)
\r
8 // Make the !run() command work
\r
10 LOCAL &datafile &file &rfile &data &tmpfile &stop &testfiles
\r
14 &rfile="test_result.txt"
\r
17 &tdir="&cfg_project_path_g\binaries\*osek*.elf"
\r
18 os cmd /c dir &tdir/B /O:N > &datafile
\r
19 &tdir="&cfg_project_path_g\binaries\*os_*.elf"
\r
20 os cmd /c dir &tdir/B /O:N >> &datafile
\r
23 os cmd /c del &rfile
\r
24 os cmd /c echo "" > &rfile
\r
27 // Start file at #10 to make space for others to use #1..#9
\r
28 OPEN #10 &datafile /read
\r
32 // &file="&cfg_project_path_g"+"/binaries/system_kernel_testsystem_"+"&data"+".elf"
\r
33 &file="&cfg_project_path_g"+"/binaries/"+"&data"
\r
37 &tmpfile=os.tmpfile()
\r
38 GOSUB testrun &file "hopp.txt"
\r
39 os cmd /c type hopp.txt >> &rfile
\r
40 &testfiles=&testfiles+1
\r
44 print "Press any key"
\r
54 print "NO testfiles found"
\r
58 print "Ran:" &testfiles " testfiles"
\r
64 //-------------------------------------
\r
66 LOCAL &file &term_file
\r
67 ENTRY &file &term_file
\r
69 IF ("&file"=="")||!OS.FILE("&file")
\r