From: Giovanni Mascellani gmascellani@codeweavers.com
--- tests/vkd3d_shader_stress.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/tests/vkd3d_shader_stress.c b/tests/vkd3d_shader_stress.c index 9a490e586..7e20daa9f 100644 --- a/tests/vkd3d_shader_stress.c +++ b/tests/vkd3d_shader_stress.c @@ -29,6 +29,8 @@ VKD3D_DEBUG_ENV_NAME("");
#define READ_SIZE 4096
+static bool silent_pass = false; + static bool read_shader(const char *path, struct vkd3d_shader_code *code) { size_t size = 0, capacity = 0; @@ -184,18 +186,34 @@ static bool compile_shader(const char *path) }
out: - printf("%s: %s\n", ret ? "PASS" : "FAIL", path); + if (!ret) + printf("FAIL: %s\n", path); + else if (!silent_pass) + printf("PASS: %s\n", path);
vkd3d_free((void *)compile_info.source.code);
return ret; }
+static inline void parse_args(int argc, char *argv[]) +{ + unsigned int i; + + for (i = 1; i < argc; ++i) + { + if (!strcmp(argv[i], "--silent-pass")) + silent_pass = true; + } +} + int main(int argc, char *argv[]) { unsigned int test_count = 0, success_count = 0; char line[4096];
+ parse_args(argc, argv); + while (fgets(line, sizeof(line), stdin)) { size_t len = strlen(line);