diff options
author | Tobias Jakobi <tjakobi@math.uni-bielefeld.de> | 2015-02-24 15:20:44 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-03-10 19:21:33 +0000 |
commit | 6e2a9f936e032813dfb5be7d18cabdd177910645 (patch) | |
tree | 3e0adb8c1e32434917bf89dd559451d96fdd373e /tests/exynos | |
parent | a7c865dc0a574c67208855b5b814dc874a02fa85 (diff) |
tests/exynos: introduce wait_for_user_input
Currently getchar() is used to pause execution after each test.
The user isn't informed if one is supposed to do anything for
the tests to continue, so print a simple message to make this
more clear.
v3: Compactify printf calls as pointed out by
Emil Velikov <emil.l.velikov@gmail.com>.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
Diffstat (limited to 'tests/exynos')
-rw-r--r-- | tests/exynos/exynos_fimg2d_test.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c index 8ef0eb3a..d89fc231 100644 --- a/tests/exynos/exynos_fimg2d_test.c +++ b/tests/exynos/exynos_fimg2d_test.c @@ -214,6 +214,14 @@ static void exynos_destroy_buffer(struct exynos_bo *bo) exynos_bo_destroy(bo); } +static void wait_for_user_input(int last) +{ + printf("press <ENTER> to %s\n", last ? "exit test application" : + "skip to next test"); + + getchar(); +} + static int g2d_solid_fill_test(struct exynos_device *dev, struct exynos_bo *dst) { struct g2d_context *ctx; @@ -644,7 +652,7 @@ int main(int argc, char **argv) goto err_rm_fb; } - getchar(); + wait_for_user_input(0); src = exynos_create_buffer(dev, screen_width * screen_height * 4, 0); if (!src) { @@ -658,7 +666,7 @@ int main(int argc, char **argv) goto err_free_src; } - getchar(); + wait_for_user_input(0); ret = test_case.copy_with_scale(dev, src, bo, G2D_IMGBUF_GEM); if (ret < 0) { @@ -666,7 +674,7 @@ int main(int argc, char **argv) goto err_free_src; } - getchar(); + wait_for_user_input(1); /* * The blend test uses the userptr functionality of exynos-drm, which |