HomePhorge

(PUP-3244) Add a hashbang line to the acceptance test enc
0a837255d6d7Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-3244) Add a hashbang line to the acceptance test enc

Ruby's Kernel.exec has different behavior on different platforms when
handling a script without a hashbang line. On rhel6, for instance:

[root@a3m9lej0pifviyl ~]# cat /root/test
echo 'foo'
[root@a3m9lej0pifviyl ~]# /root/test arg
foo
[root@a3m9lej0pifviyl ~]# irb
irb(main):001:0> exec('/root/test', 'arg')
Errno::ENOEXEC: Exec format error - /root/test

from (irb):1:in `exec'
from (irb):1
from :0

This seems to depend on how the underlying platforms exec functions
handle this case. Rewriting the enc as a ruby file with a hashbang line
sidesteps this issue and allows the test to run. Also dropped the
environment.conf usage since it seemed superfluous.

Details

Provenance
Josh Partlow <joshua.partlow@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUa1a41854c31f: (maint) Fix typo in test name
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Partlow <joshua.partlow@puppetlabs.com> committed rPU0a837255d6d7: (PUP-3244) Add a hashbang line to the acceptance test enc (authored by Josh Partlow <joshua.partlow@puppetlabs.com>).Oct 14 2014, 8:29 PM