Commit c81197ef authored by Mislav Marohnić's avatar Mislav Marohnić Committed by GitHub
Browse files

Merge pull request #1038 from yuichiro-naito/run_test_on_freebsd

Run test on freebsd
parents d799bddb f70d958f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
#!/bin/bash
#!/usr/bin/env bash
# Usage: script/brew-publish <formula-name> <repo> <version>
set -euo pipefail

+1 −1
Original line number Diff line number Diff line
#!/bin/bash
#!/usr/bin/env bash
# Usage: script/release
#
# - checks out the master branch
+14 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ assert_build_log() {
  cached_tarball "yaml-0.1.6"
  cached_tarball "ruby-2.0.0"

  stub uname '-s : echo Linux'
  stub brew false
  stub_make_install
  stub_make_install
@@ -69,6 +70,7 @@ assert_build_log() {
  install_fixture definitions/needs-yaml
  assert_success

  unstub uname
  unstub make

  assert_build_log <<OUT
@@ -85,6 +87,7 @@ OUT
  cached_tarball "yaml-0.1.6"
  cached_tarball "ruby-2.0.0"

  stub uname '-s : echo Linux'
  stub brew false
  stub_make_install
  stub_make_install
@@ -93,6 +96,7 @@ OUT
  TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<""
  assert_success

  unstub uname
  unstub make
  unstub patch

@@ -111,6 +115,7 @@ OUT
  cached_tarball "yaml-0.1.6"
  cached_tarball "ruby-2.0.0"

  stub uname '-s : echo Linux'
  stub brew false
  stub_make_install
  stub_make_install
@@ -119,6 +124,7 @@ OUT
  TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.rb"
  assert_success

  unstub uname
  unstub make
  unstub patch

@@ -139,12 +145,14 @@ OUT
  brew_libdir="$TMP/homebrew-yaml"
  mkdir -p "$brew_libdir"

  stub uname '-s : echo Linux'
  stub brew "--prefix libyaml : echo '$brew_libdir'" false
  stub_make_install

  install_fixture definitions/needs-yaml
  assert_success

  unstub uname
  unstub brew
  unstub make

@@ -275,6 +283,7 @@ OUT
@test "setting RUBY_MAKE_INSTALL_OPTS to a multi-word string" {
  cached_tarball "ruby-2.0.0"

  stub uname '-s : echo Linux'
  stub_make_install

  export RUBY_MAKE_INSTALL_OPTS="DOGE=\"such wow\""
@@ -283,6 +292,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz"
DEF
  assert_success

  unstub uname
  unstub make

  assert_build_log <<OUT
@@ -295,6 +305,7 @@ OUT
@test "setting MAKE_INSTALL_OPTS to a multi-word string" {
  cached_tarball "ruby-2.0.0"

  stub uname '-s : echo Linux'
  stub_make_install

  export MAKE_INSTALL_OPTS="DOGE=\"such wow\""
@@ -303,6 +314,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz"
DEF
  assert_success

  unstub uname
  unstub make

  assert_build_log <<OUT
@@ -355,6 +367,7 @@ apply -p1 -i /my/patch.diff
exec ./configure "\$@"
CONF

  stub uname '-s : echo Linux'
  stub apply 'echo apply "$@" >> build.log'
  stub_make_install

@@ -364,6 +377,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/pub/ruby-2.0.0.tar.gz"
DEF
  assert_success

  unstub uname
  unstub make
  unstub apply

+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ export TMP="$BATS_TEST_DIRNAME/tmp"
if [ "$FIXTURE_ROOT" != "$BATS_TEST_DIRNAME/fixtures" ]; then
  export FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures"
  export INSTALL_ROOT="$TMP/install"
  PATH=/usr/bin:/usr/sbin:/bin/:/sbin
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
  PATH="$BATS_TEST_DIRNAME/../bin:$PATH"
  PATH="$TMP/bin:$PATH"
  export PATH