Bug 602786 - lirasm: fix trivial Windows test failure (r=nnethercote)
authorRick Reitmaier <rreitmai>
Mon, 01 Nov 2010 17:09:00 -0700
changeset 57694 a23a09d2a9b6758e9ee3365e640c2afce219ebdc
parent 57693 57e35d1ac950d8f082986e7903e4ba0324b6b0d6
child 57695 2b77342e96dd89e2c5b2294a682d4d5ad88355f4
push id17032
push userrsayre@mozilla.com
push dateWed, 17 Nov 2010 21:55:39 +0000
treeherdermozilla-central@78a42f77bb90 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnnethercote
bugs602786
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 602786 - lirasm: fix trivial Windows test failure (r=nnethercote)
js/src/lirasm/testlirc.sh
--- a/js/src/lirasm/testlirc.sh
+++ b/js/src/lirasm/testlirc.sh
@@ -21,17 +21,18 @@ function runtest {
     fi
 
     if [[ ! -e "$outfile" ]]
     then
         echo "$0: error: no out file $outfile"
         exit 1
     fi
 
-    if $LIRASM $options --execute $infile | tr -d '\r' > testoutput.txt && cmp -s testoutput.txt $outfile
+    # sed used to strip extra leading zeros from exponential values 'e+00' (see bug 602786)
+    if $LIRASM $options --execute $infile | tr -d '\r' | sed -e 's/e\+00*/e\+0/g' > testoutput.txt && cmp -s testoutput.txt $outfile
     then
         echo "TEST-PASS | lirasm | lirasm $options --execute $infile"
     else
         echo "TEST-UNEXPECTED-FAIL | lirasm | lirasm $options --execute $infile"
         echo "expected output"
         cat $outfile
         echo "actual output"
         cat testoutput.txt