Skip to content

Commit

Permalink
8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when chec…
Browse files Browse the repository at this point in the history
…king LD_LIBRARY_PATH

Backport-of: ebac7eec8e5923c66a80cbd66e79c354f30a07a3
  • Loading branch information
MBaesken committed Mar 21, 2023
1 parent 752494f commit 15674a9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/jdk/tools/jpackage/share/AppLauncherEnvTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -26,6 +26,7 @@
import java.util.List;
import java.util.Optional;
import java.util.function.BiFunction;
import java.util.stream.Stream;
import jdk.jpackage.test.JPackageCommand;
import jdk.jpackage.test.Annotations.Test;
import jdk.jpackage.test.Executor;
Expand Down Expand Up @@ -83,8 +84,10 @@ public static void test() throws Exception {
final String expectedEnvVarValue = Optional.ofNullable(System.getenv(
envVarName)).orElse("") + File.pathSeparator + appDir;

TKit.assertEquals(expectedEnvVarValue, actualEnvVarValue, String.format(
"Check value of %s env variable", envVarName));
TKit.assertTextStream(expectedEnvVarValue)
.predicate(TKit.isLinux() ? String::endsWith : String::equals)
.label(String.format("value of %s env variable", envVarName))
.apply(Stream.of(actualEnvVarValue));

final String javaLibraryPath = getValue.apply(2, "java.library.path");
TKit.assertTrue(
Expand Down

1 comment on commit 15674a9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.