Closed Bug 397155 Opened 18 years ago Closed 18 years ago

cd fails in toolkit/mozapps/extensions/test/unit/addons/

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jag+mozilla, Assigned: jag+mozilla)

Details

Attachments

(1 file, 1 obsolete file)

/bin/sh: line 1: cd: ../../../../../mozilla/toolkit/mozapps/extensions/test/unit/addons/test_bug394300_2: No such file or directory adding: CVS/ (stored 0%) adding: install.rdf (deflated 69%) The above is repeated once for every dir in the addons dir. The code in the Makefile cds into the test's source directory and zips up its contents into a corresponding xpi file in $objdir/_tests/xpcshell-simple/test_extensionmanager/unit/addons/ Unfortunately the way it cds into the test's source directory is through the path had from $(ADDONSRC), which (in my setup) is relative to the objdir it's in. The first cd will succeed, but the second and onward fail because the relative path won't resolve, due to different depth levels. The fix is relatively simple, just execute the cd and zip in a subshell.
Attached patch Execute cd and zip in subshell (obsolete) — Splinter Review
I connected the cd and zip through && so nothing funky will happen if cd ever fails (e.g. someone puts a file there)
Attachment #281928 - Flags: superreview?(benjamin)
Attachment #281928 - Flags: review?
Attachment #281928 - Flags: review? → review?(dtownsend)
Comment on attachment 281928 [details] [diff] [review] Execute cd and zip in subshell 1) I'd prefer the subshell to be on the same line, e.g. (cd $$dir && zip...) 2) Can we add $(EXIT_ON_ERROR) to make this more sane?
Attachment #281928 - Flags: superreview?(benjamin) → superreview-
Something like this?
Attachment #281928 - Attachment is obsolete: true
Attachment #282277 - Flags: superreview?(benjamin)
Attachment #281928 - Flags: review?(dtownsend)
Attachment #282277 - Flags: superreview?(benjamin) → superreview+
Checking in Makefile.in; /cvsroot/mozilla/toolkit/mozapps/extensions/test/Makefile.in,v <-- Makefile.in new revision: 1.2; previous revision: 1.1 done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Summary: cd fails in toolkit/mozapps/extensions/test/unit/addons/Makefile → cd fails in toolkit/mozapps/extensions/test/unit/addons/
Component: Testing → Build Config
QA Contact: testing → build-config
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: