mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 14:56:18 +00:00
tests/kms_setmode: don't save/restore vt graphics for dry-run
Signed-off-by: Imre Deak <imre.deak@intel.com>
This commit is contained in:
parent
40cc4b8d10
commit
86f60ee593
@ -744,12 +744,12 @@ int igt_subtest_init_parse_opts(int argc, char **argv,
|
|||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
print_usage(command_str, help_str, false);
|
print_usage(command_str, help_str, false);
|
||||||
ret = -2;
|
ret = -1;
|
||||||
goto out;
|
goto out;
|
||||||
case '?':
|
case '?':
|
||||||
if (opterr) {
|
if (opterr) {
|
||||||
print_usage(command_str, help_str, true);
|
print_usage(command_str, help_str, true);
|
||||||
ret = -1;
|
ret = -2;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -779,7 +779,7 @@ void igt_subtest_init(int argc, char **argv)
|
|||||||
ret = igt_subtest_init_parse_opts(argc, argv, NULL, NULL, NULL, NULL);
|
ret = igt_subtest_init_parse_opts(argc, argv, NULL, NULL, NULL, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
/* exit with no error for -h/--help */
|
/* exit with no error for -h/--help */
|
||||||
exit(ret == -2 ? 0 : ret);
|
exit(ret == -1 ? 0 : ret);
|
||||||
|
|
||||||
/* reset opt parsing */
|
/* reset opt parsing */
|
||||||
optind = 1;
|
optind = 1;
|
||||||
|
@ -701,6 +701,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
igt_fixture {
|
igt_fixture {
|
||||||
drm_fd = drm_open_any();
|
drm_fd = drm_open_any();
|
||||||
|
if (!dry_run)
|
||||||
do_or_die(igt_set_vt_graphics_mode());
|
do_or_die(igt_set_vt_graphics_mode());
|
||||||
|
|
||||||
drm_resources = drmModeGetResources(drm_fd);
|
drm_resources = drmModeGetResources(drm_fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user