aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2020-07-17 13:12:46 +0100
committerTamar Christina <tamar.christina@arm.com>2020-07-17 13:12:46 +0100
commit7c4491e33d1be16bfb85d448862a8b956d35e4d8 (patch)
treea5c27c7054e610bb9845a0fe0dce12b051b76f82 /gcc
parente410cbff5d5a408b7c64a0c426951afc2a24df93 (diff)
downloadgcc-7c4491e33d1be16bfb85d448862a8b956d35e4d8.zip
gcc-7c4491e33d1be16bfb85d448862a8b956d35e4d8.tar.gz
gcc-7c4491e33d1be16bfb85d448862a8b956d35e4d8.tar.bz2
Testuite: Document environment setting directives
This document some of the existing DejaGnu directives to modify environment variables before test or compiler invocations. gcc/ChangeLog: * doc/sourcebuild.texi (dg-set-compiler-env-var, dg-set-target-env-var): Document.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/doc/sourcebuild.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 9f37ac2..a7a922d 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1244,6 +1244,18 @@ This DejaGnu directive compares @var{regexp} to the combined output
that the test executable writes to @file{stdout} and @file{stderr}.
@end table
+@subsubsection Specify environment variables for a test
+
+@table @code
+@item @{ dg-set-compiler-env-var @var{var_name} "@var{var_value}" @}
+Specify that the environment variable @var{var_name} needs to be set
+to @var{var_value} before invoking the compiler on the test file.
+
+@item @{ dg-set-target-env-var @var{var_name} "@var{var_value}" @}
+Specify that the environment variable @var{var_name} needs to be set
+to @var{var_value} before execution of the program created by the test.
+@end table
+
@subsubsection Specify additional files for a test
@table @code