Skip to content

Commit 574bce3

Browse files
authored
Move pngtest to tests/third_party/libpng/ (#12798)
These two files come directly the libpng distribution and so belong in third_party. I removed the local mod we had done in favor of checking the existing output of the upstream test code. Fixes: #12795
1 parent 72f49ad commit 574bce3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

tests/test_other.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,9 +1446,10 @@ def test_sdl2_mixer_wav(self):
14461446
building.emcc(path_from_root('tests', 'sdl2_mixer_wav.c'), ['-s', 'USE_SDL_MIXER=2'], output_filename='a.out.js')
14471447

14481448
def test_libpng(self):
1449-
shutil.copyfile(path_from_root('tests', 'pngtest.png'), 'pngtest.png')
1450-
building.emcc(path_from_root('tests', 'pngtest.c'), ['--embed-file', 'pngtest.png', '-s', 'USE_LIBPNG=1'], output_filename='a.out.js')
1451-
self.assertContained('TESTS PASSED', self.run_process(config.JS_ENGINES[0] + ['a.out.js'], stdout=PIPE, stderr=PIPE).stdout)
1449+
shutil.copyfile(path_from_root('tests', 'third_party', 'libpng', 'pngtest.png'), 'pngtest.png')
1450+
building.emcc(path_from_root('tests', 'third_party', 'libpng', 'pngtest.c'), ['--embed-file', 'pngtest.png', '-s', 'USE_LIBPNG=1'], output_filename='a.out.js')
1451+
output = self.run_js('a.out.js')
1452+
self.assertContained('libpng passes test', output)
14521453

14531454
def test_libjpeg(self):
14541455
shutil.copyfile(path_from_root('tests', 'screenshot.jpg'), 'screenshot.jpg')

tests/pngtest.c renamed to tests/third_party/libpng/pngtest.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,8 +2014,6 @@ main(int argc, char *argv[])
20142014
(unsigned long) png_get_chunk_malloc_max(dummy_ptr));
20152015
png_destroy_read_struct(&dummy_ptr, NULL, NULL);
20162016

2017-
if(ierror == 0)
2018-
printf("TESTS PASSED\n");
20192017
return (int)(ierror != 0);
20202018
}
20212019
#else
File renamed without changes.

0 commit comments

Comments
 (0)