summaryrefslogtreecommitdiffstats
path: root/ue4/mycpu/test/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ue4/mycpu/test/test.sh')
-rwxr-xr-xue4/mycpu/test/test.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/ue4/mycpu/test/test.sh b/ue4/mycpu/test/test.sh
index ff1076c..43ddb9a 100755
--- a/ue4/mycpu/test/test.sh
+++ b/ue4/mycpu/test/test.sh
@@ -10,13 +10,20 @@ do
10 10
11 programfile="$input" 11 programfile="$input"
12 args="-c $programfile" 12 args="-c $programfile"
13 argsfile="${input/_program/_args}"
13 memoryfile="${input/_program/_memory}" 14 memoryfile="${input/_program/_memory}"
14 reffile="${input/_program/_output}" 15 reffile="${input/_program/_output}"
15 if [ -e "$memoryfile" ] 16
17 if [ ! -e "$argsfile" ]
16 then 18 then
17 args+=" -m $memoryfile" 19 echo " ERROR: argsfile $argsfile doesn't exist"
20 exit 1
18 fi 21 fi
19 22
23 args=$(cat "$argsfile")
24 args=${args/\#program\#/$input}
25 args=${args/\#memory\#/$memoryfile}
26
20 if [ ! -e "$reffile" ] 27 if [ ! -e "$reffile" ]
21 then 28 then
22 echo " ERROR: reference file $reffile doesn't exist" 29 echo " ERROR: reference file $reffile doesn't exist"