Am 2. Oktober 2018 21:27:59 MESZ schrieb Daniel Kahn Gillmor <[email protected]>: >Hi Patrick, all-- > >I'm trying to maintain jsunit in debian so that we can run the enigmail >test suite, and i notice that Patrick recently released jsunit 0.2.0. > >in jsunit 0.1.6 (what i've been using), the tests send their messaging >to stdout for the most part. when i try to run the same tests under >jsunit 0.2.0, i get nothing sent to stdout at all. It's not clear to >me >that the test suite actually runs at all. > >here is an approximation of the script that i use to run the built-in >jsunit sample tests on debian's build systems. You can run it directly >from the build environment: > >--------- >#!/bin/bash >set -e >workdir="$(mktemp -d)" >mkdir -m 0700 -p "$workdir/jsunit-sample-test.profile/extensions" >printf '%s/' "/usr/share/xul-ext/jsunit" > >"$workdir/jsunit-sample-test.profile/extensions/[email protected]" >cat > "$workdir/jsunit-sample-test.profile/prefs.js" <<EOF >user_pref("extensions.autoDisableScopes", 14); >user_pref("toolkit.telemetry.prompted", false); >user_pref("toolkit.telemetry.rejected", true); >user_pref("toolkit.telemetry.enabled", false); >EOF >printf '{"created":%d000}' "$(date '+%s')" >>"$workdir/jsunit-sample-test.profile/times.json" > >/usr/bin/thunderbird -profile "$workdir/jsunit-sample-test.profile" >-jsunit tests/sample-test.js >--------- > >on jsunit 1.6.2, using thunderbird 60.0, i see many lines of output to >stdout, describing the tests that were run, etc. (i've appended that >output to the end of this e-mail). > >But when i upgrade from 1.6.2 to 0.2.0, i get nothing to stdout at all, >even though i'm using the same script. (This is all with thunderbird >60.0) > > >So, questions i have about jsunit (and enigmail): > > * is there something wrong with the above script for setting up a new > thunderbird profile and running the jsunit internal unit tests? > > * should i expect output to stdout from jsunit 0.2.0? > > * is there a specific version of thunderbird that should correspond to > specific versions of jsunit that aren't marked in jsunit's > install.rdf? > > * are there specific versions of jsunit that are needed for testing > specific versions of enigmail? if so, where are those versions > recorded? > > >Regards, > > --dkg > > > >here is the output of the above script, with thunderbird 60.0, and >jsunit 0.1.6: >----------------------------- > >JSUnit: service registered >Starting JS unit tests tests/sample-test.js > >** Performing Subtest 1 ** >*** Executing sub-test 'tests/subtest1.js' *** >** Performing Synchronous tests ** >Succeed: true - true == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: syncTests :: >line 30 >AssertionError: false == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: syncTests :: >line 31 >Succeed: 15 == 15 - JS frame :: resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: syncTests :: >line 32 >Succeed: file '/home/dkg/src/enigmail/jsunit/tests/sample-test.js' OK - >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: syncTests :: >line 35 >1538505747868 addons.repository DEBUG No addons.json found. >1538505747878 addons.xpi-utils DEBUG XPI Database saved, setting >schema >version preference to 25 >** Performing async tests ** >Succeed: true - true == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: asyncTests :: >line 17 >AssertionError: false - false == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: asyncTests :: >line 18 >Succeed: equal - "3" == 3 - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: asyncTests :: >line 19 >Succeed: deepEqual - "3" deepEqual 3 - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: asyncTests :: >line 20 >AssertionError: strictEqual - "3" === 3 - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: asyncTests :: >line 21 >AssertionError: file >'/home/dkg/src/enigmail/jsunit/invalid/filename.txt' not found - >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest1.js :: asyncTests :: >line 24 >** Performing Subtest 2 ** >*** Executing sub-test 'tests/subtest2.js' *** >** Performing Synchronous tests ** >Succeed: true - true == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: syncTests :: >line 35 >AssertionError: false == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: syncTests :: >line 36 >Succeed: 15 == 15 - JS frame :: resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: syncTests :: >line 37 >Succeed: file '/home/dkg/src/enigmail/jsunit/tests/sample-test.js' OK - >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: syncTests :: >line 40 >** Performing async tests ** >Succeed: true - true == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: asyncTests :: >line 16 >AssertionError: false - false == true - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: asyncTests :: >line 17 >Succeed: equal - "3" == 3 - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: asyncTests :: >line 18 >Succeed: deepEqual - "3" deepEqual 3 - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: asyncTests :: >line 19 >AssertionError: strictEqual - "3" === 3 - JS frame :: >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: asyncTests :: >line 20 >AssertionError: file >'/home/dkg/src/enigmail/jsunit/invalid/filename.txt' not found - >resource://jsunit/jsunit-main.jsm -> >file:///home/dkg/src/enigmail/jsunit/tests/subtest2.js :: asyncTests :: >line 23 > >FINAL STATS > >TestResult: executed : 20 >TestResult: succeeded: 12 >TestResult: failed : 8 >1538505748039 addons.manager DEBUG shutdown >1538505748040 addons.manager DEBUG Calling shutdown blocker for >XPIProvider >1538505748041 addons.xpi DEBUG shutdown >1538505748041 addons.xpi-utils DEBUG shutdown >1538505748041 addons.manager DEBUG Calling shutdown blocker for >LightweightThemeManager >1538505748041 addons.manager DEBUG Calling shutdown blocker for >GMPProvider >1538505748041 addons.manager DEBUG Calling shutdown blocker for >PluginProvider >1538505748046 addons.manager DEBUG Async provider shutdown done >*** UTM:SVC TimerManager:registerTimer called after >profile-before-change notification. Ignoring timer registration for id: >telemetry_modules_ping
Jsunit 0.2 requires at least TB 60 and Enigmail 2.1 (master). If you check the gitlab CI file, you'll see that I only use JSunit 0.2 for master, but not for the 2.0-branch. Patrick
signature.asc
Description: PGP signature
_______________________________________________ enigmail-users mailing list [email protected] To unsubscribe or make changes to your subscription click here: https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net
