Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExecutorTest testcases fail due to symlinked executable to test (not in canonical form) #40

Open
GoogleCodeExporter opened this issue Feb 4, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Following testcases fail in my specific environment:
ExecutorTest::testExecuteUnixLegalSystemCommand()
ExecutorTest::testExecuteUnixGoodWorkDirectory()
ExecutorTest::testExecuteUnixChainedParameter()

This is caused by executable to test ('/bin/sh') that here is a symlink to 
'bin/bash'. Therefore in DefaultExecutor::executeSystemCommandLonghand() 
comparison [if (strcmp($resolved, realpath($resolved)) != 0)] is evaluated to 
TRUE and an ExecutorException is thrown.

Having /bin/sh symlinked is a behavior to expect.

And as unit tests are supposed to test correctness/completeness of program code 
and *not* environment specifics, ExecutorTest should be fixed in regards to 
symlink awareness.

Original issue reported on code.google.com by marcus.k...@googlemail.com on 20 Sep 2010 at 9:55

@GoogleCodeExporter
Copy link
Author

Original comment by marcus.k...@googlemail.com on 20 Sep 2010 at 9:56

  • Changed title: ExecutorTest testcases fail due to symlinked executable to test (not in canonical form)

@GoogleCodeExporter
Copy link
Author

I consider a "getResolvedSymlink($path)" function in file 
test/testresources/TestHelpers.php that in case of non-WIN OS will test for a 
symlink and resolve it. For any other cases is returned unmodified.

see attached patch!

Original comment by marcus.k...@googlemail.com on 20 Sep 2010 at 11:19

Attachments:

@GoogleCodeExporter
Copy link
Author

All these issues must be dealt with before 1.0. New issues will be on a case by 
case basis as to whether we hold up 1.0 or not. 

Original comment by vande...@gmail.com on 17 Jun 2011 at 3:36

  • Added labels: Milestone-Release1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant