Skip to content

Commit e7a52d2

Browse files
committed
add ch3/ch4 tests: ch3_trace, ch4_trace1
1 parent f9bfb82 commit e7a52d2

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

check/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def test(expected, not_expected=[]):
2222
print(f'\033[92m[PASS]\033[0m not found <{pattern}>')
2323
else:
2424
print(f'\033[91m[FAIL]\033[0m found <{pattern}>')
25-
26-
print(f"Actual: {count}, Expected: {total}")
25+
2726
print('\nTest passed: %d/%d' % (count, total))
2827
assert count == total

check/ch3.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
r"time_msec = (\d+) after sleeping (\d+) ticks, delta = (\d+)ms!",
1111
"Test sleep1 passed!",
1212

13-
# ch3_taskinfo
14-
"string from task info test",
15-
"Test task info OK!",
13+
# ch3_trace
14+
"string from task trace test",
15+
"Test trace OK!",
1616
]
1717

18-
print(f"Expected: {EXPECTED_3}")
19-
2018
if __name__ == "__main__":
2119
base.test(EXPECTED_3)

check/ch4.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
# ch4_unmap2
1616
"Test 04_6 ummap2 OK!",
17+
18+
# ch4_trace1
19+
"Test trace_1 OK!",
1720
]
1821

1922
NOT_EXPECTED_4 = NOT_EXPECTED_2b + [

check/ch5.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
]
1616

1717
EXPECTED_5 = list(set(EXPECTED_5) - set([
18-
"string from task info test",
19-
"Test task info OK!",
18+
"string from task trace test",
19+
"Test trace OK!",
20+
"Test trace_1 OK!",
2021
]))
2122

2223
if __name__ == "__main__":

0 commit comments

Comments
 (0)