Skip to content

Commit ebac7ee

Browse files
committed
8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH
Reviewed-by: asemenyuk, almatvee
1 parent 36995c5 commit ebac7ee

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/jdk/tools/jpackage/share/AppLauncherEnvTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
2626
import java.util.List;
2727
import java.util.Optional;
2828
import java.util.function.BiFunction;
29+
import java.util.stream.Stream;
2930
import jdk.jpackage.test.JPackageCommand;
3031
import jdk.jpackage.test.Annotations.Test;
3132
import jdk.jpackage.test.Executor;
@@ -83,8 +84,10 @@ public static void test() throws Exception {
8384
final String expectedEnvVarValue = Optional.ofNullable(System.getenv(
8485
envVarName)).orElse("") + File.pathSeparator + appDir;
8586

86-
TKit.assertEquals(expectedEnvVarValue, actualEnvVarValue, String.format(
87-
"Check value of %s env variable", envVarName));
87+
TKit.assertTextStream(expectedEnvVarValue)
88+
.predicate(TKit.isLinux() ? String::endsWith : String::equals)
89+
.label(String.format("value of %s env variable", envVarName))
90+
.apply(Stream.of(actualEnvVarValue));
8891

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

0 commit comments

Comments
 (0)