add target to makefile to invoke toolkit/components/feeds tests

RESOLVED FIXED

Status

()

Firefox
RSS Discovery and Preview
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: davel, Assigned: davel)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

12 years ago
replace shell script (exectests.sh) with makefile targets similar to xpcshell-simple test harness examples
(Assignee)

Comment 1

12 years ago
Created attachment 221394 [details] [diff] [review]
trunk patch to add "check" target and remove shell script
Attachment #221394 - Flags: review?(sayrer)

Comment 2

12 years ago
Comment on attachment 221394 [details] [diff] [review]
trunk patch to add "check" target and remove shell script

r=sayrer
Attachment #221394 - Flags: review?(sayrer) → review+
(Assignee)

Updated

12 years ago
Blocks: 322893
(Assignee)

Comment 3

12 years ago
Checking in Makefile.in;
/cvsroot/mozilla/toolkit/components/feeds/Makefile.in,v  <--  Makefile.in
new revision: 1.2; previous revision: 1.1
done
Removing test/exectests.sh;
/cvsroot/mozilla/toolkit/components/feeds/test/exectests.sh,v  <--  exectests.shnew revision: delete; previous revision: 1.1
done
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Summary: add target to makefile to invoke toolkit/compontent/feeds tests → add target to makefile to invoke toolkit/components/feeds tests
(Assignee)

Comment 4

12 years ago
change breaks on cygwin - nsinstall does not like a directory as an arg
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 5

12 years ago
Created attachment 222228 [details] [diff] [review]
a version that will work on windows

I'm testing this now on win32, and will test on mac/win with a mozconfig that does not define an objdir.  if that works, I'll request review.

the libs:: target did not work because windws does not support nsinstall of directories

Since shell.js and test.js do not write anything to the current dir, I cd to the source dir before running the tests.  but DIST is relative to the objdir, so I had to add PWD to the path to run-mozilla.sh and xpcshell (and PWD is the dir before the cd)

abspath did not work, so I used realpath

realpath did not work if I used it on both run-mozilla.sh and xpcshell, so I only used it on the first one
Attachment #221394 - Attachment is obsolete: true
(Assignee)

Comment 6

12 years ago
Comment on attachment 222228 [details] [diff] [review]
a version that will work on windows

realpath does not work
Attachment #222228 - Attachment is obsolete: true
(Assignee)

Comment 7

12 years ago
Created attachment 222274 [details] [diff] [review]
patch works on windows, mac, linux

is there a better way to wrap the xpcshell invocation?
Attachment #222274 - Flags: superreview?
Attachment #222274 - Flags: review?(sayrer)
(Assignee)

Updated

12 years ago
Attachment #222274 - Flags: superreview? → superreview?(benjamin)

Comment 8

12 years ago
Comment on attachment 222274 [details] [diff] [review]
patch works on windows, mac, linux

ABS_DEPTH := $(shell cd $(DEPTH) && pwd) will make your life a lot simpler.
Attachment #222274 - Flags: superreview?(benjamin) → superreview-
(Assignee)

Comment 9

12 years ago
Instead of making the wrappers aware of cwd, I've changed the test harness code for this component to pass the directory containing the tests to the test runner (shell.js).  I've tested on mac (intel), and will test on win/linux shortly.
(Assignee)

Comment 10

12 years ago
Created attachment 223237 [details] [diff] [review]
patch that special-cases windows due to path problems

on non-windows, shell.js parses the test data directory from the xpcshell command line

on windows, cd to the test data directory before running xpcshell (and use ABS_DEPTH as suggested by :bs to invoke xpcshell)
Attachment #223237 - Flags: superreview?(benjamin)
Attachment #223237 - Flags: review?(sayrer)

Updated

12 years ago
Attachment #222274 - Flags: review?(sayrer)

Comment 11

12 years ago
Comment on attachment 223237 [details] [diff] [review]
patch that special-cases windows due to path problems

+load(topDir.path+'/test.js');

r=sayrer, assuming that line works on Windows.
Attachment #223237 - Flags: review?(sayrer) → review+
(Assignee)

Updated

12 years ago
Attachment #222274 - Attachment is obsolete: true

Updated

12 years ago
Attachment #223237 - Flags: superreview?(benjamin) → superreview+
(Assignee)

Comment 12

12 years ago
Checking in Makefile.in;
/cvsroot/mozilla/toolkit/components/feeds/Makefile.in,v  <--  Makefile.in
new revision: 1.4; previous revision: 1.3
done
Checking in test/shell.js;
/cvsroot/mozilla/toolkit/components/feeds/test/shell.js,v  <--  shell.js
new revision: 1.2; previous revision: 1.1
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.