summaryrefslogtreecommitdiff
path: root/app-shells/ksh/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:19:36 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-14 23:22:23 +0100
commit4b19be30aa626b327c885dae62c559ec0e9fb935 (patch)
tree76e74807bc479502e13866b581b6bf86734ec634 /app-shells/ksh/files
parent30d6f67c98d149508509d5e86f176d558793acc0 (diff)
gentoo resync : 13.10.2019
Diffstat (limited to 'app-shells/ksh/files')
-rw-r--r--app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch30
-rw-r--r--app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch36
2 files changed, 66 insertions, 0 deletions
diff --git a/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch b/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch
new file mode 100644
index 000000000000..9f5d70f4d33c
--- /dev/null
+++ b/app-shells/ksh/files/ksh-2020.0.0-ensure-user-set.patch
@@ -0,0 +1,30 @@
+From cb9f6d3498622b46de021a7f4798512d203747e9 Mon Sep 17 00:00:00 2001
+From: Kurtis Rader <krader@skepticism.us>
+Date: Sun, 1 Sep 2019 15:44:40 -0700
+Subject: [PATCH] Ensure USER is set when unit tests run
+
+Related #1391
+---
+ src/cmd/ksh93/tests/util/run_test.sh | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/cmd/ksh93/tests/util/run_test.sh b/src/cmd/ksh93/tests/util/run_test.sh
+index 20d24ed1fda..ebc74770cae 100644
+--- a/src/cmd/ksh93/tests/util/run_test.sh
++++ b/src/cmd/ksh93/tests/util/run_test.sh
+@@ -62,6 +62,15 @@ fi
+ #
+ export OS_NAME=$(uname -s | tr '[A-Z]' '[a-z]')
+
++#
++# Make sure $USER is set. A CI/CB environment might not set it.
++# See https://github.com/att/ast/issues/1391
++#
++if [[ -z $USER ]]
++then
++ export USER=$(id -un)
++fi
++
+ # TODO: Enable the `io` test on Travis macOS once we understand why it dies from an abort().
+ # I'm not seeing that failure happen on either of my macOS 10.12 or 10.13 systems.
+ if [[ $test_name == io && $OS_NAME == darwin && $CI == true ]]
diff --git a/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch b/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch
new file mode 100644
index 000000000000..f832d175454e
--- /dev/null
+++ b/app-shells/ksh/files/ksh-2020.0.0-skip-api-test.patch
@@ -0,0 +1,36 @@
+From d89753b5d38482f4a3f17ba3b7d09ab07cfe7419 Mon Sep 17 00:00:00 2001
+From: Kurtis Rader <krader@skepticism.us>
+Date: Sun, 1 Sep 2019 13:47:40 -0700
+Subject: [PATCH] Skip API test if build type != debug
+
+Fixes #1390
+---
+ src/lib/libast/tests/misc/meson.build | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/libast/tests/misc/meson.build b/src/lib/libast/tests/misc/meson.build
+index 67a178762fa..a4c864428d8 100644
+--- a/src/lib/libast/tests/misc/meson.build
++++ b/src/lib/libast/tests/misc/meson.build
+@@ -10,6 +10,12 @@ tests_to_skip = [
+ ['freebsd', 'debug'],
+ ]
+
++# Non-debug build types affect the behavior of `backtrace()`. Which means it will almost certainly
++# break the "debug" test. See https://github.com/att/ast/issues/1390.
++if get_option('buildtype') != 'debug'
++ tests_to_skip += [['*', 'debug']]
++endif
++
+ foreach test_name: tests
+ # If the platform doesn't have an execinfo.h header there is no point in trying to run the
+ # debug.c unit test.
+@@ -18,7 +24,7 @@ foreach test_name: tests
+ endif
+ skip_test = false
+ foreach skip : tests_to_skip
+- if system == skip[0] and test_name == skip[1]
++ if ('*' == skip[0] or system == skip[0]) and test_name == skip[1]
+ warning('skipping ' + test_name + ' on ' + system)
+ skip_test = true
+ # break # Not until meson 0.49