Skip to content

Commit

Permalink
Remove non-portable source commands
Browse files Browse the repository at this point in the history
`source(1)` is a bashism and is equivalent to the portable `.(1)`, but
as each commond is run in a new shell, spawning a shell to source a file
and exit is at best noop.

Some SUT used by acceptance tests do not use bash(1) as the default
shell, which cause CI failures because `source(1)` is not a valid
command.

Because we set variables in profile files, assume they are sourced
during shell startup will be available to next spawned shells.
  • Loading branch information
smortex committed Jan 4, 2024
1 parent 919fc9b commit ed8981e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ def export_locales(locale)
LitmusHelper.instance.run_shell("echo export LANGUAGE=#{locale} >> /etc/profile.d/my-custom.lang.sh")
LitmusHelper.instance.run_shell('echo export LC_COLLATE=C >> /etc/profile.d/my-custom.lang.sh')
LitmusHelper.instance.run_shell("echo export LC_CTYPE=#{locale} >> /etc/profile.d/my-custom.lang.sh")
LitmusHelper.instance.run_shell('source /etc/profile.d/my-custom.lang.sh')
LitmusHelper.instance.run_shell('echo export LC_ALL="C" >> ~/.bashrc')
LitmusHelper.instance.run_shell('source ~/.bashrc')
end

def pre_run
Expand Down

0 comments on commit ed8981e

Please sign in to comment.