root/trunk/ProjectFortress/testSerialization

Revision 723, 1.9 kB (checked in by dr2chase, 1 year ago)

junit.jar needs to be on classpath in build.xml; also updated testing shell scripts

  • Property svn:executable set to *
Line 
1 #!/bin/bash
2
3 ################################################################################
4 #    Copyright 2007 Sun Microsystems, Inc.,
5 #    4150 Network Circle, Santa Clara, California 95054, U.S.A.
6 #    All rights reserved.
7 #
8 #    U.S. Government Rights - Commercial software.
9 #    Government users are subject to the Sun Microsystems, Inc. standard
10 #    license agreement and applicable provisions of the FAR and its supplements.
11 #
12 #    Use is subject to license terms.
13 #
14 #    This distribution may include materials developed by third parties.
15 #
16 #    Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
17 #    trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
18 ################################################################################
19
20 # This script reads a "bunch" of tests (currently, all who name begins
21 # with the letter "a"), writes their ASTs to disk, then runs a program that
22 # reads ASTs and writes them to disk, and then compares that the twice-written
23 # AST does not differ from the once-written AST.  Notice that AST writing itself
24 # might omit information, so what this is really testing is AST reading.
25
26 if (uname | egrep -q CYGWIN) ; then
27   CP="build;third_party/junit/junit.jar;third_party/xtc/xtc.jar;third_party/jsr166y/jsr166y.jar;third_party/plt/plt.jar"
28 else
29   CP="build:third_party/junit/junit.jar:third_party/xtc/xtc.jar:third_party/jsr166y/jsr166y.jar:third_party/plt/plt.jar"
30 fi
31
32 A=testSerializationScratch
33
34 rm -rf $A
35 mkdir $A
36
37 for i in tests/a*.fss ; do
38 TFSNAME=`basename $i .fss`.tfs
39 java -cp "$CP" -Xmx320m -Xms192m \
40 com.sun.fortress.interpreter.drivers.fs -parseOnly -ast $i
41   mv $TFSNAME $A
42 done
43
44 # Tup is an old testing driver that reads ASTs, in bunches, and writes them
45 # back to disk, in bunches.
46 java -cp "$CP" com.sun.fortress.interpreter.drivers.Tup -fileout=tfs $A/*.tfs
47 for i in $A/*.tfs; do
48   diff $i ${i}2
49 done
50
Note: See TracBrowser for help on using the browser.