aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-04-03 13:09:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-04-03 13:09:48 -0700
commit3d4319101722c40d37d5b104777de3eb4d1a03e3 (patch)
tree7f3beb7f9955df0491f499bf1f0a97db33af3772 /tests
parentfb83de1869826d475c8318524c3f768bcd43b7a2 (diff)
parent7bcb4e0be286440310f95fcfc2275ab59d5f9288 (diff)
Merge pull request #2232 from abergmeier/empkg_prerequisites
Empkg prerequisites
Diffstat (limited to 'tests')
-rw-r--r--tests/test_other.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index 0f5a4191..59edc7e4 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2580,6 +2580,19 @@ int main()
out, err = Popen([PYTHON, EMCC, 'a.bc'], stdout=PIPE, stderr=PIPE).communicate()
assert 'warning' in err, err
assert 'incorrect target triple' in err, err
+
+ def test_valid_abspath(self):
+ # Test whether abspath warning appears
+ abs_include_path = path_from_root('tests')
+ process = Popen([PYTHON, EMCC, '-I%s' % abs_include_path, path_from_root('tests', 'hello_world.c')], stdout=PIPE, stderr=PIPE)
+ out, err = process.communicate()
+ warning = '-I or -L of an absolute path "-I%s" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass \'-Wno-warn-absolute-paths\' to emcc to hide this warning.' % abs_include_path
+ assert(warning in err)
+
+ # Hide warning for this include path
+ process = Popen([PYTHON, EMCC, '--valid-abspath', abs_include_path,'-I%s' % abs_include_path, path_from_root('tests', 'hello_world.c')], stdout=PIPE, stderr=PIPE)
+ out, err = process.communicate()
+ assert(warning not in err)
def test_simplify_ifs(self):
def test(src, nums):