Skip to content

Commit c37c282

Browse files
committed
C#/C++: Fix tests with new environment variables
1 parent da9aa54 commit c37c282

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

csharp/autobuilder/Semmle.Autobuild.Tests/BuildScripts.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,10 @@ Autobuilder CreateAutoBuilder(string lgtmLanguage, bool isWindows,
340340
string? nugetRestore = null, string? allSolutions = null,
341341
string cwd = @"C:\Project")
342342
{
343-
Actions.GetEnvironmentVariable["CODEQL_AUTOBUILDER_CSHARP_NO_INDEXING"] = "false";
344-
Actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_TRAP_DIR"] = "";
345-
Actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_SOURCE_ARCHIVE_DIR"] = "";
343+
string codeqlUpperLanguage = lgtmLanguage.ToUpper();
344+
Actions.GetEnvironmentVariable[$"CODEQL_AUTOBUILDER_{codeqlUpperLanguage}_NO_INDEXING"] = "false";
345+
Actions.GetEnvironmentVariable[$"CODEQL_EXTRACTOR_{codeqlUpperLanguage}_TRAP_DIR"] = "";
346+
Actions.GetEnvironmentVariable[$"CODEQL_EXTRACTOR_{codeqlUpperLanguage}_SOURCE_ARCHIVE_DIR"] = "";
346347
Actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_ROOT"] = @"C:\codeql\csharp";
347348
Actions.GetEnvironmentVariable["CODEQL_JAVA_HOME"] = @"C:\codeql\tools\java";
348349
Actions.GetEnvironmentVariable["SEMMLE_DIST"] = @"C:\odasa";

0 commit comments

Comments
 (0)