@@ -73,11 +73,17 @@ class TestStagedConcolicEval extends FunSuite {
7373 println(result)
7474
7575 expect.map(vs => {
76- val stackValues = result
77- .split(" Stack contents: \n " )(1 )
78- .split(" \n " )
79- .map(_.toFloat)
80- .toList
76+ val stackValues = {
77+ val startMarker = " Stack contents: \n "
78+ val endMarker = " End of Stack contents"
79+ val start = result.indexOf(startMarker)
80+ val end = if (start >= 0 ) result.indexOf(endMarker, start + startMarker.length) else - 1
81+ require(start >= 0 && end >= 0 , s " Could not find markers ' $startMarker' and ' $endMarker' in output " )
82+ result.substring(start + startMarker.length, end).trim
83+ .split(" \n " )
84+ .map(_.toFloat)
85+ .toList
86+ }
8187 assert(vs == stackValues)
8288 })
8389 }
@@ -113,10 +119,11 @@ class TestStagedConcolicEval extends FunSuite {
113119 }
114120 test(" btree-bug-finding-concolic" ) { testFileConcolicCpp(" ./benchmarks/wasm/btree/2o1u-unlabeled.wat" , exitByCoverage = true ) }
115121
116- test(" long-trivial-execution-concrete" ) {
117- // This is a example to show how much performance improvement we can get by immutable data structure
118- testFileConcreteCpp(" ./benchmarks/wasm/staged/long-trivial-execution.wat" , None )
119- }
122+ // Don't run this test by default since it takes too long and is only for performance comparison
123+ // test("long-trivial-execution-concrete") {
124+ // // This is a example to show how much performance improvement we can get by immutable data structure
125+ // testFileConcreteCpp("./benchmarks/wasm/staged/long-trivial-execution.wat", None)
126+ // }
120127
121128 test(" return-poly - concrete" ) {
122129 testFileConcreteCpp(" ./benchmarks/wasm/staged/return_poly.wat" , Some (" $real_main" ), expect= Some (List (42 )))
0 commit comments