Bug 770141 - xpcom/tests/windows/TestRegistrationOrder.cpp fails with pymake because of a design failure with command lines on Win32. Sidestep the issue by doing it in C++ instead of the shell. r=bsmedberg

--HG--
extra : rebase_source : 29e9960ebce6882b56941de16be017f6ae0f97fe
This commit is contained in:
Siddharth Agarwal 2012-07-25 00:29:46 +05:30
parent bbab5e6e40
commit 9eef60d960
2 changed files with 13 additions and 3 deletions

View File

@ -156,8 +156,7 @@ install::
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/test.properties $(DESTDIR)$(mozappdir)/res
ifeq (,$(filter-out WINNT os2-emx, $(HOST_OS_ARCH)))
swapslashes = $(shell echo $(1) | sed -e 's|/|\\|g')
getnativepath = $(call swapslashes,$(call normalizepath,$(1)))
getnativepath = $(call normalizepath,$(1))
else
getnativepath = $(1)
endif

View File

@ -156,8 +156,19 @@ int main(int argc, char** argv)
}
ScopedLogging logging;
#ifdef XP_WIN
// On Windows, convert to backslashes
size_t regPathLen = strlen(argv[1]);
char* regPath = new char[regPathLen];
for (int i = 0; i < regPathLen; i++) {
char curr = argv[1][i];
regPath[i] = (curr == '/') ? '\\' : curr;
}
#else
const char *regPath = argv[1];
#endif
XRE_AddManifestLocation(NS_COMPONENT_LOCATION,
nsCOMPtr<nsIFile>(GetRegDirectory(regPath, "core", "component.manifest")));
XRE_AddManifestLocation(NS_COMPONENT_LOCATION,