aboutsummaryrefslogtreecommitdiff
path: root/gcc/selftest-run-tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/selftest-run-tests.c')
-rw-r--r--gcc/selftest-run-tests.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/selftest-run-tests.c b/gcc/selftest-run-tests.c
index a4cdb55..c1cd97e 100644
--- a/gcc/selftest-run-tests.c
+++ b/gcc/selftest-run-tests.c
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "target.h"
#include "langhooks.h"
+#include "options.h"
/* This function needed to be split out from selftest.c as it references
tests from the whole source tree, and so is within
@@ -38,6 +39,13 @@ along with GCC; see the file COPYING3. If not see
void
selftest::run_tests ()
{
+ /* Makefile.in has -fself-test=$(srcdir)/testsuite/selftests, so that
+ flag_self_test contains the path to the selftest subdirectory of the
+ source tree (without a trailing slash). Copy it up to
+ path_to_selftest_files, to avoid selftest.c depending on
+ option-handling. */
+ path_to_selftest_files = flag_self_test;
+
long start_time = get_run_time ();
/* Run all the tests, in hand-coded order of (approximate) dependencies: