Commit b1ab29f0 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'revert-2ec82857' into 'master'

Revert "Merge branch 'alberts-cleanup-env-var' into 'master'"

See merge request gitlab-org/gitlab!69718
parents 8dba578c 360d90c1
......@@ -21,7 +21,7 @@
.minimal-rspec-tests:
variables:
MINIMAL_RSPEC_ENABLED: "true"
RSPEC_TESTS_MAPPING_ENABLED: "true"
.decomposed-database-rspec:
variables:
......
......@@ -82,6 +82,7 @@ detect-tests:
- .detect-test-base
- .rails:rules:detect-tests
variables:
RSPEC_TESTS_MAPPING_ENABLED: "true"
MATCHED_TESTS_FILE: tmp/matching_tests.txt
detect-tests as-if-foss:
......
......@@ -159,7 +159,7 @@ function rspec_paralellized_job() {
local rspec_args="-Ispec -rspec_helper --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml ${rspec_opts}"
if [[ -n $MINIMAL_RSPEC_ENABLED ]]; then
if [[ -n $RSPEC_TESTS_MAPPING_ENABLED ]]; then
tooling/bin/parallel_rspec --rspec_args "${rspec_args}" --filter "tmp/matching_tests.txt"
else
tooling/bin/parallel_rspec --rspec_args "${rspec_args}"
......
......@@ -22,7 +22,10 @@ changed_files = mr_changes.changes.map { |change| change['new_path'] }
tff = TestFileFinder::FileFinder.new(paths: changed_files).tap do |file_finder|
file_finder.use TestFileFinder::MappingStrategies::PatternMatching.load('tests.yml')
file_finder.use TestFileFinder::MappingStrategies::DirectMatching.load_json(ENV['RSPEC_TESTS_MAPPING_PATH'])
if ENV['RSPEC_TESTS_MAPPING_ENABLED']
file_finder.use TestFileFinder::MappingStrategies::DirectMatching.load_json(ENV['RSPEC_TESTS_MAPPING_PATH'])
end
end
File.write(output_file, tff.test_files.uniq.join(' '))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment