mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-27 04:32:15 +01:00
gtestutils: Do not generate the random seed if provided
There's no point to generate a seed if we're going to overwrite it when --seed is used.
This commit is contained in:
parent
871c4b4698
commit
5d91834d9b
@ -1696,13 +1696,17 @@ void
|
||||
}
|
||||
va_end (args);
|
||||
|
||||
/* setup random seed string */
|
||||
g_snprintf (seedstr, sizeof (seedstr), "R02S%08x%08x%08x%08x", g_random_int(), g_random_int(), g_random_int(), g_random_int());
|
||||
test_run_seedstr = seedstr;
|
||||
|
||||
/* parse args, sets up mode, changes seed, etc. */
|
||||
parse_args (argc, argv);
|
||||
|
||||
if (test_run_seedstr == NULL)
|
||||
{
|
||||
/* setup random seed string */
|
||||
g_snprintf (seedstr, sizeof (seedstr), "R02S%08x%08x%08x%08x",
|
||||
g_random_int(), g_random_int(), g_random_int(), g_random_int());
|
||||
test_run_seedstr = seedstr;
|
||||
}
|
||||
|
||||
if (!g_get_prgname() && !no_g_set_prgname)
|
||||
g_set_prgname ((*argv)[0]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user