mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Make prop_test and cycle_test cwd-agnostic (#9498)
This commit is contained in:
committed by
GitHub
parent
8a3b80778a
commit
5d0af28461
5
.github/workflows/Unit-Test.yml
vendored
5
.github/workflows/Unit-Test.yml
vendored
@@ -20,9 +20,8 @@ jobs:
|
|||||||
yes | crew upgrade && \
|
yes | crew upgrade && \
|
||||||
yes | crew install vim && \
|
yes | crew install vim && \
|
||||||
yes | crew remove vim && \
|
yes | crew remove vim && \
|
||||||
cd ../tests && \
|
ruby ../tests/prop_test && \
|
||||||
./prop_test && \
|
ruby ../tests/commands/* && \
|
||||||
ruby commands/* && \
|
|
||||||
cd ~ && \
|
cd ~ && \
|
||||||
git clone --depth=1 https://github.com/chromebrew/chromebrew.git build_test && \
|
git clone --depth=1 https://github.com/chromebrew/chromebrew.git build_test && \
|
||||||
cd build_test && \
|
cd build_test && \
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
These are a collection of programs used to ensure crew is working correctly.
|
These are a collection of programs used to ensure crew is working correctly.
|
||||||
They **must** be run in this directory, otherwise they will result in false positives.
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
# This test checks whether the packages create a dependency cycle.
|
# This test checks whether the packages create a dependency cycle.
|
||||||
|
|
||||||
# Add >LOCAL< lib to LOAD_PATH
|
|
||||||
$LOAD_PATH.unshift '../lib'
|
|
||||||
|
|
||||||
require 'find'
|
require 'find'
|
||||||
require_relative '../lib/const'
|
require_relative '../lib/const'
|
||||||
require_relative '../lib/color'
|
require_relative '../lib/color'
|
||||||
require_relative '../lib/package'
|
require_relative '../lib/package'
|
||||||
|
|
||||||
|
# Add >LOCAL< lib to LOAD_PATH so that packages can be loaded
|
||||||
|
$LOAD_PATH.unshift File.join(CREW_LIB_PATH, 'lib')
|
||||||
|
|
||||||
@all_pkgs = {}
|
@all_pkgs = {}
|
||||||
|
|
||||||
puts "Running dependency cycle tests...\n".yellow
|
puts "Running dependency cycle tests...\n".yellow
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
# Add >LOCAL< lib to LOAD_PATH so that packages can be loaded
|
|
||||||
$LOAD_PATH.unshift '../lib'
|
|
||||||
|
|
||||||
require 'fileutils'
|
|
||||||
require_relative '../lib/const'
|
require_relative '../lib/const'
|
||||||
require_relative '../lib/color'
|
require_relative '../lib/color'
|
||||||
require_relative '../lib/package'
|
require_relative '../lib/package'
|
||||||
|
|
||||||
|
# Add >LOCAL< lib to LOAD_PATH so that packages can be loaded
|
||||||
|
$LOAD_PATH.unshift File.join(CREW_LIB_PATH, 'lib')
|
||||||
|
|
||||||
tofail = 0
|
tofail = 0
|
||||||
|
|
||||||
Dir.glob('../packages/*.rb').each do |filename|
|
Dir.glob('../packages/*.rb').each do |filename|
|
||||||
|
|||||||
Reference in New Issue
Block a user