Code Monkey home page Code Monkey logo

shtk's People

Contributors

jmmv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shtk's Issues

Homebrew formula test failure

I'm trying to create a Homebrew formula for shtk. Unfortunately, I'm not sure how best to test the installation.

Below are the formula and the log of brew test shtk. I wasn't sure what to choose as a post-installation test, so I picked tests/shtk/shtk_test. Running /usr/local/Cellar/shtk/1.7/tests/shtk/shtk_test (prefix/"tests/shtk/shtk_test" in the formula) in my normal shell works. I believe brew test is restricting the environment in some way to cause the failure, but I'm not sure what is expected by the test. I haven't looked deeply into this, but if anything stands out to you, I'd appreciate your help.

The shtk.rb formula:

class Shtk < Formula
  desc "Application toolkit for POSIX-compliant shell scripts"
  homepage "https://github.com/jmmv/shtk"
  url "https://github.com/jmmv/shtk/archive/shtk-1.7.tar.gz"
  sha256 "2c279b0e83d028237dd8d277a3aa3eb24086d8370b950eecae3362ec1fdc65c1"

  depends_on "autoconf" => :build
  depends_on "automake" => :build

  def install
    system "autoreconf", "-i", "-s"
    system "./configure",
      "--disable-silent-rules",
      "--prefix=#{prefix}"
    system "make", "install"
  end

  test do
    system prefix/"tests/shtk/shtk_test"
  end
end

The log of brew test shtk:

2018-11-15 15:47:12 +0200

/usr/local/Cellar/shtk/1.7/tests/shtk/shtk_test

shtk_test: I: Testing build__defaults...
Running checked command: shtk build script.sh
Expected standard error to be empty; found:
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
shtk_test: W: Delayed failure: Check of 'shtk build script.sh' failed; see stdout for details
Running checked command: ./script
Expected exit code 0 != actual exit code 127
stderr: ./script: line 1: shtk_import: command not found
stderr: ./script: line 4: shtk_cli_info: command not found
shtk_test: W: Delayed failure: Check of './script' failed; see stdout for details
shtk_test: W: Testing build__defaults... FAILED (2 delayed failures)
shtk_test: I: Testing build__mflag__explicit...
Running checked command: shtk build -m my_main script.sh
Expected standard error to be empty; found:
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
shtk_test: W: Delayed failure: Check of 'shtk build -m my_main script.sh' failed; see stdout for details
Running checked command: ./script
Expected exit code 0 != actual exit code 127
stderr: ./script: line 1: shtk_import: command not found
stderr: ./script: line 4: shtk_cli_info: command not found
shtk_test: W: Delayed failure: Check of './script' failed; see stdout for details
shtk_test: W: Testing build__mflag__explicit... FAILED (2 delayed failures)
shtk_test: I: Testing build__mflag__empty...
Running checked command: shtk build -m  script.sh
Expected standard error to be empty; found:
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
shtk_test: W: Delayed failure: Check of 'shtk build -m  script.sh' failed; see stdout for details
Running checked command: ./script
standard error did not match golden contents:
--- experr	2018-11-15 15:47:12.000000000 +0200
+++ standard error	2018-11-15 15:47:12.000000000 +0200
@@ -1 +1,2 @@
-script: I: Outside of main
+./script: line 1: shtk_import: command not found
+./script: line 3: shtk_cli_info: command not found
shtk_test: W: Delayed failure: Check of './script' failed; see stdout for details
shtk_test: W: Testing build__mflag__empty... FAILED (2 delayed failures)
shtk_test: I: Testing build__oflag__explicit...
Running checked command: shtk build -o first script.sh
Expected standard error to be empty; found:
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
shtk_test: W: Delayed failure: Check of 'shtk build -o first script.sh' failed; see stdout for details
Running checked command: ./first
Expected exit code 0 != actual exit code 127
stderr: ./first: line 1: shtk_import: command not found
stderr: ./first: line 4: shtk_cli_info: command not found
shtk_test: W: Delayed failure: Check of './first' failed; see stdout for details
shtk_test: W: Testing build__oflag__explicit... FAILED (2 delayed failures)
shtk_test: I: Testing build__oflag__stdin...
Running checked command: shtk build -o second -
Expected standard error to be empty; found:
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
shtk_test: W: Delayed failure: Check of 'shtk build -o second -' failed; see stdout for details
Running checked command: ./second
Expected exit code 0 != actual exit code 127
stderr: ./second: line 1: shtk_import: command not found
stderr: ./second: line 4: shtk_cli_info: command not found
shtk_test: W: Delayed failure: Check of './second' failed; see stdout for details
shtk_test: W: Testing build__oflag__stdin... FAILED (2 delayed failures)
shtk_test: I: Testing build__oflag__necessary...
Running checked command: shtk build script
Running checked command: shtk build -
shtk_test: I: Testing build__oflag__necessary... PASSED
shtk_test: I: Testing build__sflag...
Running checked command: shtk build -s /custom/interpreter script.sh
Expected standard error to be empty; found:
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
shtk_test: W: Delayed failure: Check of 'shtk build -s /custom/interpreter script.sh' failed; see stdout for details
Running checked command: head -n1 script
standard output did not match golden contents:
--- shtk_unittest_expect_command.inline	2018-11-15 15:47:12.000000000 +0200
+++ standard output	2018-11-15 15:47:12.000000000 +0200
@@ -1 +1 @@
-#! /custom/interpreter
+We won't run this anyway.
shtk_test: W: Delayed failure: Check of 'head -n1 script' failed; see stdout for details
shtk_test: W: Testing build__sflag... FAILED (2 delayed failures)
shtk_test: I: Testing build__no_args...
Running checked command: shtk build
shtk_test: I: Testing build__no_args... PASSED
shtk_test: I: Testing build__too_many_args...
Running checked command: shtk build foo bar
shtk_test: I: Testing build__too_many_args... PASSED
shtk_test: I: Testing build__unknown_option...
Running checked command: shtk build -Z
shtk_test: I: Testing build__unknown_option... PASSED
shtk_test: I: Testing build__missing_argument...
Running checked command: shtk build -m
shtk_test: I: Testing build__missing_argument... PASSED
shtk_test: I: Testing version__ok...
Running checked command: shtk version
/Users/leather/bin/grep: line 3: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
Expected regexp 'shtk [0-9]+\.[0-9]+.*' not found in standard output:
shtk 1.7
shtk_test: W: Delayed failure: Check of 'shtk version' failed; see stdout for details
shtk_test: W: Testing version__ok... FAILED (1 delayed failures)
shtk_test: I: Testing version__too_many_args...
Running checked command: shtk version foo
shtk_test: I: Testing version__too_many_args... PASSED
shtk_test: I: Testing no_command...
Running checked command: shtk
shtk_test: I: Testing no_command... PASSED
shtk_test: I: Testing unknown_command...
Running checked command: shtk foo
shtk_test: I: Testing unknown_command... PASSED
shtk_test: W: Ran 15 tests; 7 FAILED

HOMEBREW_VERSION: 1.8.2-86-g05e670e
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 05e670e1b29c7ce59a30909b924fb56d9f7770bd
Last commit: 26 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 7eae5afa387cfbf6a512d14457d166657a8f2e28
Core tap last commit: 4 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/leather/Library/Caches/Homebrew
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 9.0 build 900
Git: 2.19.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_71
macOS: 10.12.6-x86_64
CLT: 9.2.0.0.1.1510905681
Xcode: N/A
XQuartz: 2.7.11 => /opt/X11

CC: /usr/bin/clang
CXX: /usr/bin/clang++
OBJC: /usr/bin/clang
OBJCXX: /usr/bin/clang++
CFLAGS: -Os -w -pipe -march=native -mmacosx-version-min=10.12
CXXFLAGS: -Os -w -pipe -march=native -mmacosx-version-min=10.12
CPPFLAGS: -F/usr/local/Frameworks
LDFLAGS: -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names
MAKEFLAGS: -j8
CMAKE_FRAMEWORK_PATH: /usr/local/Frameworks
PKG_CONFIG_LIBDIR: /usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12:/usr/lib/pkgconfig
HOMEBREW_GIT: git
PATH: /usr/local/Cellar/shtk/1.7/bin:/usr/local/texlive/2016/bin/x86_64-darwin:/usr/local/bin:/Users/leather/.local/bin:/Users/leather/.cargo/bin:/Users/leather/bin:/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin
CPATH: /usr/local/include

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.