Files
mercury/tools/make_java_csharp_arena_diff
Zoltan Somogyi 1bed6fd2cc Add tools for checking Java and C# output.
tools/make_java_csharp_arena_base:
tools/make_java_csharp_arena_diff:
    Add these scripts, which can be used to check whether the output
    of a new compiler in Java and C# grades is bit-identical to the output
    of a known-good old compiler. This is particularly useful on machines
    that can't check the correctness of the output in these grades
    because they don't have Java or C# compilers installed.
2017-07-13 13:12:51 +02:00

44 lines
894 B
Bash
Executable File

#!/bin/sh
# vim: ft=sh ts=4 sw=4 et
#
# This script is documented in the companion script make_java_csharp_base.
if test "${TEST_MMC}" = ""
then
echo "make_java_csharp_diff: you need to set TEST_MMC in the environment"
exit 1
fi
root=`/bin/pwd`
/bin/rm -fr arena.java arena.csharp > /dev/null 2>&1
cp -rp arena.base arena.java
cp -rp arena.base arena.csharp
cd ${root}/arena.java
for f in *.m
do
echo === JAVA ${f} ===
${TEST_MMC} --grade java --target-code-only ${f}
done
cd ${root}/arena.csharp
for f in *.m
do
echo === CSHARP ${f} ===
${TEST_MMC} --grade csharp --target-code-only ${f}
done
cd ${root}
diff -ur arena.base.java arena.java > DIFF.ARENA.JAVA 2>&1
diff -ur arena.base.csharp arena.csharp > DIFF.ARENA.CSHARP 2>&1
echo JAVA DIFF START
cat DIFF.ARENA.JAVA
echo JAVA DIFF END
echo CSHARP DIFF START
cat DIFF.ARENA.CSHARP
echo CSHARP DIFF END
exit 0