tests/syntax/identifier/runtests
author Edouard Tisserant
Tue, 09 Jul 2019 08:31:02 +0200
changeset 1088 9cb7c8bf7dbc
parent 258 d7d92b2f87e9
permissions -rwxr-xr-x
Add a column to VARIABLES.CSV, containing variable (derived) type name, additionally to current last column contyaining base type name
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