File tree 2 files changed +18
-8
lines changed
2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 5
5
6
6
7
7
CHECK_MEMRECLAIM = os .getenv ('MEMRECLAIM' , '0' ) == '1'
8
+ SERDE_JSON = os .getenv ('SERDE_JSON' , '0' ) == '1'
8
9
9
10
JSON_FILES = [
10
11
{'file' : 'https://raw.githubusercontent.com/mloskot/json_benchmark/master/data/canada.json' ,
11
- 'vsz' : 2880000 },
12
+ 'vsz' : 2880000 if SERDE_JSON else 598000 },
12
13
{'file' : 'https://raw.githubusercontent.com/RichardHightower/json-parsers-benchmark/master/data/citm_catalog.json' ,
13
- 'vsz' : 847000 },
14
+ 'vsz' : 847000 if SERDE_JSON else 200000 },
14
15
]
15
16
16
17
@@ -64,7 +65,7 @@ def delete():
64
65
for i in range (0 , 100 ):
65
66
env .execute_command ('json.del' , 'json' , f'json{ i } ' )
66
67
print (f"--- del: t={ datetime .timedelta (seconds = time .monotonic () - t0 )} " )
67
-
68
+
68
69
fi = 0
69
70
for jfile in JSON_FILES :
70
71
fi += 1
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ cd $HERE
15
15
help () {
16
16
cat << -END
17
17
Run Python tests
18
-
18
+
19
19
[ARGVARS...] tests.sh [--help|help] [<module-so-path>]
20
-
20
+
21
21
Argument variables:
22
22
VERBOSE=1 Print commands
23
23
IGNERR=1 Do not abort on error
@@ -29,7 +29,7 @@ help() {
29
29
GEN=0|1 General tests
30
30
AOF=0|1 Tests with --test-aof
31
31
SLAVES=0|1 Tests with --test-slaves
32
-
32
+
33
33
TEST=test Run specific test (e.g. test.py:test_name)
34
34
LOG=0|1 Write to log
35
35
VALGRIND|VD=1 Run with Valgrind
@@ -91,11 +91,20 @@ valgrind_summary() {
91
91
92
92
run_tests () {
93
93
local title=" $1 "
94
- [[ ! -z $title ]] && { $ROOT /opt/readies/bin/sep -0; printf " Tests with $title :\n\n" ; }
94
+ if [[ -z $title ]]; then
95
+ title=" General tests"
96
+ else
97
+ title=" Tests with $title "
98
+ fi
99
+
95
100
cd $ROOT /tests/pytest
96
101
[[ ! -z $TESTMOD ]] && RLTEST_ARGS+=--module $TESTMOD
97
- $OP python3 -m RLTest --clear-logs --module $MODULE --module-args " JSON_BACKEND SERDE_JSON" $RLTEST_ARGS
102
+
103
+ { $READIES /bin/sep -0; printf " $title :\n\n" ; }
98
104
$OP python3 -m RLTest --clear-logs --module $MODULE $RLTEST_ARGS
105
+
106
+ { $READIES /bin/sep -0; printf " $title (SERDE_JSON):\n\n" ; }
107
+ SERDE_JSON=1 $OP python3 -m RLTest --clear-logs --module $MODULE --module-args " JSON_BACKEND SERDE_JSON" $RLTEST_ARGS
99
108
}
100
109
101
110
# ----------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments