Skip to content

Commit becc2aa

Browse files
authored
Improve benchmark.test_zzz_poppler to partially build in MEMORY64 mode (#25338)
Improve benchmark.test_zzz_poppler to partially build in MEMORY64 mode, and improve the skip mechanism to skip also 64-bit builds. #25335
1 parent 73be6c8 commit becc2aa

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/test_benchmark.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def do_benchmark(self, name, src, expected_output='FAIL', args=None,
436436
emcc_args=None, native_args=None, shared_args=None,
437437
force_c=False, reps=TEST_REPS, native_exec=None,
438438
output_parser=None, args_processor=None, lib_builder=None,
439-
skip_native=False):
439+
skip_benchmarkers=None):
440440
if not benchmarkers:
441441
raise Exception('error, no benchmarkers')
442442

@@ -452,7 +452,7 @@ def do_benchmark(self, name, src, expected_output='FAIL', args=None,
452452
print()
453453
baseline = None
454454
for b in benchmarkers:
455-
if skip_native and isinstance(b, NativeBenchmarker):
455+
if skip_benchmarkers and b.name in skip_benchmarkers:
456456
continue
457457
if not b.run:
458458
# If we won't run the benchmark, we don't need repetitions.
@@ -1113,14 +1113,19 @@ def test_zzz_poppler(self):
11131113
''' % DEFAULT_ARG)
11141114

11151115
def lib_builder(name, native, env_init): # noqa
1116+
if '-sMEMORY64' in env_init['CFLAGS']:
1117+
env_init['CPPFLAGS'] = '-sMEMORY64'
1118+
env_init['LDFLAGS'] = '-sMEMORY64'
11161119
return self.get_poppler_library(env_init=env_init)
11171120

1118-
# TODO: Fix poppler native build and remove skip_native=True
11191121
self.do_benchmark('poppler', '', 'hashed printout',
11201122
shared_args=['-I' + test_file('poppler/include'),
11211123
'-I' + test_file('freetype/include')],
11221124
emcc_args=['-sFILESYSTEM', '--pre-js=pre.js', '--embed-file',
11231125
test_file('poppler/emscripten_html5.pdf') + '@input.pdf',
11241126
'-sERROR_ON_UNDEFINED_SYMBOLS=0',
11251127
'-sMINIMAL_RUNTIME=0'], # not minimal because of files
1126-
lib_builder=lib_builder, skip_native=True)
1128+
lib_builder=lib_builder,
1129+
# TODO: Fix poppler native and freetype MEMORY64 builds to be able
1130+
# to remove these skips
1131+
skip_benchmarkers=['clang', 'gcc', 'v8-64', 'node-64'])

0 commit comments

Comments
 (0)