From 7b889a2350d75632492dbde7eddb55f26254cc0a Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 2 Feb 2022 20:29:45 +0000 Subject: [PATCH] separate tests for dynamic --- tests/run_tests.sh | 1 + tests/run_tests_dynamic.sh | 17 +++++++++++++++++ tests/{color_test.py => test_color.py} | 0 tests/test_float_pointers.py | 9 +++++++++ tests/{hello_world.py => test_hello_world.py} | 0 tests/{test_physac.py => xtest_physac.py} | 0 tests/{test_physac2.py => xtest_physac2.py} | 0 tests/{raygui_test.py => xtest_raygui.py} | 0 ...ygui_test_pyray.py => xtest_raygui_pyray.py} | 0 tests/{test_rlgl.py => xtest_rlgl.py} | 0 tests/{test_static.py => xtest_static.py} | 0 ...th_prefix.py => xtest_static_with_prefix.py} | 0 12 files changed, 27 insertions(+) create mode 100755 tests/run_tests_dynamic.sh rename tests/{color_test.py => test_color.py} (100%) create mode 100644 tests/test_float_pointers.py rename tests/{hello_world.py => test_hello_world.py} (100%) rename tests/{test_physac.py => xtest_physac.py} (100%) rename tests/{test_physac2.py => xtest_physac2.py} (100%) rename tests/{raygui_test.py => xtest_raygui.py} (100%) rename tests/{raygui_test_pyray.py => xtest_raygui_pyray.py} (100%) rename tests/{test_rlgl.py => xtest_rlgl.py} (100%) rename tests/{test_static.py => xtest_static.py} (100%) rename tests/{test_static_with_prefix.py => xtest_static_with_prefix.py} (100%) diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 3f08e20..653a442 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +rm raylib pyray examples ln -s ../raylib ln -s ../pyray ln -s ../examples diff --git a/tests/run_tests_dynamic.sh b/tests/run_tests_dynamic.sh new file mode 100755 index 0000000..1942448 --- /dev/null +++ b/tests/run_tests_dynamic.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +rm raylib pyray examples +ln -s ../dynamic/raylib +ln -s ../dynamic/pyray +ln -s ../examples +for FILE in test_*.py +do + if python3 $FILE; then + echo $FILE returned true + else + echo $FILE returned some error + rm raylib pyray examples + exit + fi +done +rm raylib pyray examples \ No newline at end of file diff --git a/tests/color_test.py b/tests/test_color.py similarity index 100% rename from tests/color_test.py rename to tests/test_color.py diff --git a/tests/test_float_pointers.py b/tests/test_float_pointers.py new file mode 100644 index 0000000..f354fdd --- /dev/null +++ b/tests/test_float_pointers.py @@ -0,0 +1,9 @@ +import pyray as pr + +pr.init_window(1280, 720, "any") + +shader = pr.load_shader("", "shader.fs") +time = pr.ffi.new("float *", 0.0) +timeLoc = pr.get_shader_location(shader, "uTime") +pr.set_shader_value(shader, timeLoc, time, pr.SHADER_UNIFORM_FLOAT) +pr.set_shader_value(shader, timeLoc, 0.0, pr.SHADER_UNIFORM_FLOAT) \ No newline at end of file diff --git a/tests/hello_world.py b/tests/test_hello_world.py similarity index 100% rename from tests/hello_world.py rename to tests/test_hello_world.py diff --git a/tests/test_physac.py b/tests/xtest_physac.py similarity index 100% rename from tests/test_physac.py rename to tests/xtest_physac.py diff --git a/tests/test_physac2.py b/tests/xtest_physac2.py similarity index 100% rename from tests/test_physac2.py rename to tests/xtest_physac2.py diff --git a/tests/raygui_test.py b/tests/xtest_raygui.py similarity index 100% rename from tests/raygui_test.py rename to tests/xtest_raygui.py diff --git a/tests/raygui_test_pyray.py b/tests/xtest_raygui_pyray.py similarity index 100% rename from tests/raygui_test_pyray.py rename to tests/xtest_raygui_pyray.py diff --git a/tests/test_rlgl.py b/tests/xtest_rlgl.py similarity index 100% rename from tests/test_rlgl.py rename to tests/xtest_rlgl.py diff --git a/tests/test_static.py b/tests/xtest_static.py similarity index 100% rename from tests/test_static.py rename to tests/xtest_static.py diff --git a/tests/test_static_with_prefix.py b/tests/xtest_static_with_prefix.py similarity index 100% rename from tests/test_static_with_prefix.py rename to tests/xtest_static_with_prefix.py