]> khamidou — GitHub mirrors - arcanist.git/commit
Restore directory after executing ArcanistBundleTestCase
authorepriestley <git@epriestley.com>
Wed, 30 Jan 2013 19:24:41 +0000 (11:24 -0800)
committerepriestley <git@epriestley.com>
Wed, 30 Jan 2013 19:24:41 +0000 (11:24 -0800)
commit51f32bdde710f9452aeddaced4d419c14b61bd9c
treef8128f49d5ec9ee49cd179a100da469317e16d2b
parentc45053da4cb8c585f0814e079a5c5d391e184228
Restore directory after executing ArcanistBundleTestCase

Summary:
This test currently chdir()'s into a directory which is later removed. If another test tries to run a shell script while the CWD is invalid, the shell may emit this to stderr:

  shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Among other things, this can cause the XHPAST test to fail, because it detects syntax errors by examining stderr.

Instead, retore the directory.

Test Plan: Ran "arc unit --everything", which could previously fail if XHPAST ran after Bundle.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran
Differential Revision: https://secure.phabricator.com/D4738
src/parser/__tests__/ArcanistBundleTestCase.php