Skip to content
This repository has been archived by the owner on Oct 18, 2018. It is now read-only.

Commit

Permalink
Switch from 'cfx' to 'jpm' for packaging (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
xabolcs committed Nov 9, 2015
1 parent beb18f0 commit 120356a
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 24 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
@@ -1,3 +0,0 @@
[submodule "addon-sdk"]
path = addon-sdk
url = https://github.com/mozilla/addon-sdk.git
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -23,14 +23,15 @@ addons:

install:
- pip install --user mozdownload
- npm install jpm --global

before_script:
- sh -e /etc/init.d/xvfb start
- mozdownload $MOZDOWNLOADPARAMS
- tar -xf *firefox*.tar.bz2

script:
- ant test -Dbinary=`pwd`/firefox/firefox
- ant test -Dbinary=$PWD/firefox/firefox

notifications:
irc:
Expand Down
1 change: 0 additions & 1 deletion addon-sdk
Submodule addon-sdk deleted from 12f7d5
19 changes: 8 additions & 11 deletions build.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>

<project name="memchaser" default="dev">
<project name="memchaser@quality.mozilla.org" default="dev">
<property name="xpi.dir" value="./xpi"/>

<tstamp>
Expand Down Expand Up @@ -56,27 +56,24 @@
<target name="build">
<property name="build.filename" value="extension/${ant.project.name}.xpi"/>
<delete file="${build.filename}"/>
<exec executable="/bin/sh" dir="addon-sdk" failonerror="true">
<arg value="-c"/>
<arg value=". bin/activate;cd ../extension;cfx ${cfx.verbose} xpi"/>
<exec executable="jpm" dir="extension" failonerror="true">
<arg line="${cfx.verbose} xpi"/>
</exec>
<echo>build.filename: ${build.filename}</echo>
</target>

<target name="run">
<exec executable="/bin/sh" dir="addon-sdk" failonerror="true">
<arg value="-c"/>
<arg value=". bin/activate;cd ../extension;cfx ${cfx.verbose} run ${cfx.binary}"/>
<exec executable="jpm" dir="extension" failonerror="true">
<arg line="${cfx.binary} run"/>
</exec>
</target>

<target name="test">
<exec executable="/bin/sh"
dir="addon-sdk"
<exec executable="jpm"
dir="extension"
resultproperty="test.result"
failonerror="true">
<arg value="-c"/>
<arg value=". bin/activate;cd ../extension;cfx --verbose test ${cfx.binary}"/>
<arg line="--verbose ${cfx.binary} test"/>
</exec>
<fail message="Tests failed!">
<condition>
Expand Down
8 changes: 4 additions & 4 deletions extension/lib/main.js → extension/index.js
Expand Up @@ -14,10 +14,10 @@ const tabs = require("sdk/tabs");
const { ToggleButton } = require('sdk/ui/button/toggle');
const { Toolbar } = require("sdk/ui/toolbar");

const config = require("./config");
const garbage_collector = require("./garbage-collector");
const { Logger } = require("./logger");
var memory = require("./memory");
const config = require("lib/config");
const garbage_collector = require("lib/garbage-collector");
const { Logger } = require("lib/logger");
var memory = require("lib/memory");

Cu.import('resource://gre/modules/Services.jsm');

Expand Down
2 changes: 1 addition & 1 deletion extension/package.json
Expand Up @@ -10,7 +10,7 @@
"Uchida Taishi"
],
"version": "0.7",
"fullName": "MemChaser",
"title": "MemChaser",
"id": "memchaser@quality.mozilla.org",
"description": "Chasing garbage collection and memory usage",
"preferences": [{
Expand Down
4 changes: 2 additions & 2 deletions extension/test/test-garbage-collector.js
@@ -1,9 +1,9 @@
const prefs = require("sdk/preferences/service");

const config = require("./config");
const config = require("../lib/config");

exports.test_javascript_memory_pref_enabled = function (test) {
// We have to require the garbage collector to initialize the module
var gc = require("./garbage-collector");
var gc = require("../lib/garbage-collector");
test.assert(prefs.get(gc.reporter.pref_gc_notifications));
}
2 changes: 1 addition & 1 deletion extension/test/test-logger.js
@@ -1,6 +1,6 @@
const { Cc, Ci, Cu } = require("chrome");

const { Logger } = require("./logger");
const { Logger } = require("../lib/logger");

Cu.import('resource://gre/modules/Services.jsm');

Expand Down

0 comments on commit 120356a

Please sign in to comment.