@@ -4915,24 +4915,26 @@ def test_jslib_search_path(self):
49154915
49164916 # Tests using the #warning directive in JS library files
49174917 def test_jslib_warnings(self):
4918- proc = self.run_process([EMCC, test_file('hello_world.c'), '--js-library', test_file('warning_in_js_libraries.js')], stdout=PIPE, stderr=PIPE)
4918+ shutil.copy(test_file('warning_in_js_libraries.js'), '.')
4919+ proc = self.run_process([EMCC, test_file('hello_world.c'), '--js-library', 'warning_in_js_libraries.js'], stdout=PIPE, stderr=PIPE)
49194920 self.assertNotContained('This warning should not be present!', proc.stderr)
4920- self.assertContained('warning_in_js_libraries.js:5: #warning This is a warning string!', proc.stderr)
4921- self.assertContained('warning_in_js_libraries.js:7: #warning This is a second warning string!', proc.stderr)
4921+ self.assertContained('warning: warning_in_js_libraries.js:5: #warning This is a warning string!', proc.stderr)
4922+ self.assertContained('warning: warning_in_js_libraries.js:7: #warning This is a second warning string!', proc.stderr)
49224923 self.assertContained('emcc: warning: warnings in JS library compilation [-Wjs-compiler]', proc.stderr)
49234924
4924- err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', test_file( 'warning_in_js_libraries.js') , '-Werror'])
4925+ err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', 'warning_in_js_libraries.js', '-Werror'])
49254926 self.assertNotContained('This warning should not be present!', err)
4926- self.assertContained('warning_in_js_libraries.js:5: #warning This is a warning string!', err)
4927- self.assertContained('warning_in_js_libraries.js:7: #warning This is a second warning string!', err)
4927+ self.assertContained('warning: warning_in_js_libraries.js:5: #warning This is a warning string!', err)
4928+ self.assertContained('warning: warning_in_js_libraries.js:7: #warning This is a second warning string!', err)
49284929 self.assertContained('emcc: error: warnings in JS library compilation [-Wjs-compiler] [-Werror]', err)
49294930
49304931 # Tests using the #error directive in JS library files
49314932 def test_jslib_errors(self):
4932- err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', test_file('error_in_js_libraries.js')])
4933+ shutil.copy(test_file('error_in_js_libraries.js'), '.')
4934+ err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', 'error_in_js_libraries.js'])
49334935 self.assertNotContained('This error should not be present!', err)
4934- self.assertContained('error_in_js_libraries.js:5: #error This is an error string!', err)
4935- self.assertContained('error_in_js_libraries.js:7: #error This is a second error string!', err)
4936+ self.assertContained('error: error_in_js_libraries.js:5: #error This is an error string!', err)
4937+ self.assertContained('error: error_in_js_libraries.js:7: #error This is a second error string!', err)
49364938
49374939 def test_jslib_include(self):
49384940 create_file('inc.js', '''
0 commit comments