Skip to content

Commit afd9de2

Browse files
Debugger callback at every level, run and compare the tests (diagnostic)
1 parent 849b240 commit afd9de2

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

‎include/hx/Debug.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void __hxcpp_dbg_setNewStackFrameFunction(Dynamic function);
303303
void __hxcpp_dbg_setNewThreadInfoFunction(Dynamic function);
304304
void __hxcpp_dbg_setAddParameterToStackFrameFunction(Dynamic function);
305305
void __hxcpp_dbg_setAddStackFrameToThreadInfoFunction(Dynamic function);
306-
#if defined(HXCPP_SCRIPTABLE) && (HXCPP_API_LEVEL >= 500)
306+
#if defined(HXCPP_SCRIPTABLE)
307307
void __hxcpp_dbg_setOnScriptLoadedFunction(Dynamic function);
308308
#endif
309309

@@ -359,7 +359,7 @@ inline void __hxcpp_dbg_setNewStackFrameFunction(Dynamic) { }
359359
inline void __hxcpp_dbg_setNewThreadInfoFunction(Dynamic) { }
360360
inline void __hxcpp_dbg_setAddParameterToStackFrameFunction(Dynamic) { }
361361
inline void __hxcpp_dbg_setAddStackFrameToThreadInfoFunction(Dynamic) { }
362-
#if defined(HXCPP_SCRIPTABLE) && (HXCPP_API_LEVEL >= 500)
362+
#if defined(HXCPP_SCRIPTABLE)
363363
inline void __hxcpp_dbg_setOnScriptLoadedFunction(Dynamic) { }
364364
#endif
365365

‎src/hx/Debugger.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ void __hxcpp_dbg_setAddStackFrameToThreadInfoFunction(Dynamic function)
15751575
}
15761576

15771577

1578-
#if defined(HXCPP_SCRIPTABLE) && (HXCPP_API_LEVEL >= 500)
1578+
#if defined(HXCPP_SCRIPTABLE)
15791579
void __hxcpp_dbg_setOnScriptLoadedFunction(Dynamic function)
15801580
{
15811581
hx::g_onScriptLoadedFunction = function;

‎test/regression/preview-all.sh‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
#!/bin/bash
2-
# Throwaway: builds every regression test and prints the first errors of each failure
3-
ok=0; bad=0
2+
# Throwaway: builds and runs every regression test, from inside its directory,
3+
# and compares its output with stdout.txt as Run.hx does
4+
pass=0; fail=0; nobuild=0
45
for t in */; do
56
t=${t%/}
67
[ -f "$t/build.hxml" ] || continue
7-
if haxe -C "$t" build.hxml -D HXCPP_M64 > "$t.log" 2>&1; then
8-
ok=$((ok+1))
9-
else
10-
bad=$((bad+1))
8+
if ! (cd "$t" && haxe build.hxml -D HXCPP_M64) > "$t.log" 2>&1; then
9+
nobuild=$((nobuild+1))
1110
first=$(sed 's/\x1b\[[0-9;]*m//g' "$t.log" | grep -aE 'error:|Type not found|has not been declared|no member|^ *\| [A-Z]' | head -2 | tr '\n' ' ' | cut -c1-240)
1211
echo "BUILD $t: $first"
12+
continue
13+
fi
14+
out=$(cd "$t" && timeout 300 bin/Main 2>&1 | tr -d '\r')
15+
if [ "$out" = "$(tr -d '\r' < "$t/stdout.txt")" ]; then
16+
pass=$((pass+1))
17+
else
18+
fail=$((fail+1))
19+
echo "OUTPUT $t:"
20+
diff <(echo "$out") <(tr -d '\r' < "$t/stdout.txt") | head -6
1321
fi
1422
done
15-
echo "built $ok, failed $bad"
23+
echo "passed $pass, wrong output $fail, did not build $nobuild"

0 commit comments

Comments
 (0)