mirror of
https://github.com/openbsd/ports.git
synced 2026-06-18 07:24:23 +02:00
fix one test (bash vs. ksh), skip another (lack of script(1) options)
This commit is contained in:
@@ -30,4 +30,6 @@ CONFIGURE_ARGS += --disable-docs
|
||||
# makes all tests fail with SIGILL
|
||||
CONFIGURE_ARGS += --disable-valgrind
|
||||
|
||||
TEST_DEPENDS = shells/bash
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
Index: src/main.c
|
||||
--- src/main.c.orig
|
||||
+++ src/main.c
|
||||
@@ -334,6 +334,11 @@ int main(int argc, char* argv[]) {
|
||||
_setmode(fileno(stderr), _O_TEXT | _O_U8TEXT);
|
||||
#endif
|
||||
|
||||
+ if (pledge("stdio getpw rpath", NULL) == -1) {
|
||||
+ fprintf(stderr, "pledge\n");
|
||||
+ die();
|
||||
+ }
|
||||
+
|
||||
if (argc) progname = argv[0];
|
||||
|
||||
jq = jq_init();
|
||||
@@ -0,0 +1,20 @@
|
||||
- use bash(1) as ksh(1) `set -v' behaviour difference causes false positive
|
||||
- skip one test expecting script(1) `-e' and `-q'
|
||||
|
||||
Index: tests/shtest
|
||||
--- tests/shtest.orig
|
||||
+++ tests/shtest
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh -x
|
||||
+#!/usr/local/bin/bash -x
|
||||
|
||||
. "${0%/*}/setup" "$@"
|
||||
|
||||
@@ -506,6 +506,7 @@ cmp $d/warning $d/expect_warning
|
||||
test_no_color=true
|
||||
$msys && test_no_color=false
|
||||
$mingw && test_no_color=false
|
||||
+[ "$(uname -s)" = OpenBSD ] && test_no_color=false
|
||||
if $test_no_color && command -v script >/dev/null 2>&1; then
|
||||
unset NO_COLOR
|
||||
if script -qc echo /dev/null >/dev/null 2>&1; then
|
||||
Reference in New Issue
Block a user