tests/syntax/identifier/runtests
author mjsousa
Tue, 24 Jan 2017 12:44:44 +0000
changeset 1028 7c8709ce6b8f
parent 258 d7d92b2f87e9
permissions -rwxr-xr-x
Correcty determine the datatype (TIME) of the parameters of SFC actions with timed qualifiers
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     1
#!/bin/bash
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     2
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     3
# assume no error to start with...
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     4
error=0
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     5
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     6
for ff in `ls *.test`
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     7
do
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     8
  for id in `cat $ff | grep "^#" | sed "s/#[^ ]*//g"`
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
     9
  do
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    10
	sed s/XXXX/$id/g $ff > $ff"_"$id.iec
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    11
	if `../../../iec2iec $ff"_"$id.iec -I ../../../lib > $ff"_"$id.out 2>$ff"_"$id.err`
258
d7d92b2f87e9 Merging my Huge change with Edouards/Laurents version
Mario de Sousa <msousa@fe.up.pt>
parents: 108
diff changeset
    12
	#if `../../../iec2c $ff"_"$id.iec -I ../../../lib > $ff"_"$id.out 2>$ff"_"$id.err`
108
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    13
		# TODO before deciding test is success [OK]
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    14
		#       - test whether xxx.out has size <> 0
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    15
		#       - test whether xxx.err has size == 0
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    16
		#       - (?) test whether xxx.out2 is identical to xxx.out
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    17
		#       - (?) test whether xxx.err2 has size == 0
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    18
		#       - perhaps produce a [WARN] instead of [ERROR] in cases of (?)
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    19
	  then echo "[ O K ]   " $ff "->" $id
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    20
	  else echo "[ERROR]   " $ff "->" $id; error=1
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    21
	fi
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    22
#	../../../iec2iec $ff"_"$id.out -I ../../../lib > $ff"_"$id.out2 2>$ff"_"$id.err2
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    23
  done
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    24
done
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    25
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    26
echo
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    27
if `test $error = 1`
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    28
  then echo "FAILURE -> At least one of the tests failed!"
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    29
  else echo "SUCCESS -> All tests passed!"
f9e001952488 Regression tests. Test correct parsing of identifiers.
mario
parents:
diff changeset
    30
fi