diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-27 20:30:32 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-27 20:31:08 -0500 |
commit | 8da0914d013d9c05d37332a4fd4b95bed016db94 (patch) | |
tree | e480d8e17c5dc39c9ca2dc12ea2c637f89d9ee4a | |
parent | 985f71322dd35a187a0103e2de36facf63138adc (diff) |
add preparations for gles2 emulation tests
-rw-r--r-- | tests/glbook/Chapter_2/Hello_Triangle/Hello_Triangle_orig.c | 2 | ||||
-rwxr-xr-x | tests/runner.py | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/glbook/Chapter_2/Hello_Triangle/Hello_Triangle_orig.c b/tests/glbook/Chapter_2/Hello_Triangle/Hello_Triangle_orig.c index fd4c506a..cc25a559 100644 --- a/tests/glbook/Chapter_2/Hello_Triangle/Hello_Triangle_orig.c +++ b/tests/glbook/Chapter_2/Hello_Triangle/Hello_Triangle_orig.c @@ -171,7 +171,7 @@ void Draw ( ESContext *esContext ) glVertexAttribPointer ( 0, 3, GL_FLOAT, GL_FALSE, 0, vVertices ); glEnableVertexAttribArray ( 0 ); - glDrawArrays ( GL_TRIANGLES, 0, 3 ); + glDrawArrays ( GL_TRIANGLES, 0, 3 ); // TODO: need glDrawElements! } int main ( int argc, char *argv[] ) diff --git a/tests/runner.py b/tests/runner.py index 50568762..907031aa 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10688,13 +10688,19 @@ elif 'browser' in str(sys.argv): open(os.path.join(self.get_dir(), filename), 'w').write(self.with_report_result(src)) else: expected = [str(i) for i in range(0, reference_slack+1)] - shutil.copyfile(path_from_root('tests', filename), os.path.join(self.get_dir(), filename)) + shutil.copyfile(path_from_root('tests', filename), os.path.join(self.get_dir(), os.path.basename(filename))) self.reftest(path_from_root('tests', reference)) args = args + ['--pre-js', 'reftest.js', '-s', 'GL_TESTING=1'] - Popen([PYTHON, EMCC, os.path.join(self.get_dir(), filename), '-o', 'test.html'] + args).communicate() + Popen([PYTHON, EMCC, os.path.join(self.get_dir(), os.path.basename(filename)), '-o', 'test.html'] + args).communicate() if type(expected) is str: expected = [expected] self.run_browser('test.html', '.', ['/report_result?' + e for e in expected]) + def zzztest_glbook_emulation(self): + self.btest(os.path.join('glbook', 'Chapter_2', 'Hello_Triangle', 'Hello_Triangle_orig.c'), + reference=path_from_root('tests', 'glbook', 'CH02_HelloTriangle.png'), + args=['-I' + path_from_root('tests', 'glbook', 'Common'), + path_from_root('tests', 'glbook', 'Common', 'esUtil.c')]) + def test_emscripten_api(self): self.btest('emscripten_api_browser.cpp', '1', args=['-s', '''EXPORTED_FUNCTIONS=['_main', '_third']''']) |