Have Karma suppress PhantomJS/Chrome status messages? - karma-runner

I'm using PhantomJS for my Karma tests and the output is full of:
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 198 of 307 (skipped 23) SUCCESS (0 secs / 11.566 secs)
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 199 of 307 (skipped 23) SUCCESS (0 secs / 11.574 secs)
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 200 of 307 (skipped 23) SUCCESS (0 secs / 11.582 secs)
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 201 of 307 (skipped 23) SUCCESS (0 secs / 11.591 secs)
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 202 of 307 (skipped 23) SUCCESS (0 secs / 11.599 secs)
Or when I use HeadlessChrome I see:
HeadlessChrome 0.0.0 (Mac OS X 10.12.6): Executed 274 of 307 (skipped 31) SUCCESS (0 secs / 6.467 secs)
HeadlessChrome 0.0.0 (Mac OS X 10.12.6): Executed 275 of 307 (skipped 31) SUCCESS (0 secs / 6.468 secs)
HeadlessChrome 0.0.0 (Mac OS X 10.12.6): Executed 276 of 307 (skipped 31) SUCCESS (0 secs / 6.468 secs)
But when I look at https://www.npmjs.com/package/karma-mocha-reporter examples, these don't exist. Am I missing something somewhere?
Guess I'm looking to see if I can just clean this output up somehow?

Well I feel silly. That's the default process plugin that Angular CLI does. Removed that and all good.

Related

How do I fix a blank white screen for Visual Studio Code run remotely through X11?

Visual Studio Code displays perfectly from a local display on a Ubuntu 20 installation, but just produces a blank white window when run from a remote Ubuntu machine through X-windows. Running code --disable-gpu doesn't help. Other applications such as Firefox, Nautilus, and Eclipse display remotely with no problem.
Any suggestions?
There is an issue for this upstream: https://github.com/microsoft/vscode/issues/110119
Running code --verbose --log debug --disable-gpu prints, among others:
[3440:1116/110926.098706:WARNING:x11_util.cc(1520)] X error received: serial 169, error_code 1 (BadRequest (invalid request code or no such operation)), request_code 130, minor_code 1 (X_ShmAttach)
[3440:1116/110926.129228:WARNING:x11_util.cc(1520)] X error received: serial 170, error_code 1 (BadRequest (invalid request code or no such operation)), request_code 130, minor_code 1 (X_ShmAttach)
[3440:1116/110926.170878:WARNING:x11_util.cc(1520)] X error received: serial 171, error_code 1 (BadRequest (invalid request code or no such operation)), request_code 130, minor_code 3 (X_ShmPutImage)
[3440:1116/110926.204224:WARNING:x11_util.cc(1520)] X error received: serial 172, error_code 1 (BadRequest (invalid request code or no such operation)), request_code 130, minor_code 3 (X_ShmPutImage)
I don't know much about X, but I would expect X shared memory (shm) to not work via X forwarding, and maybe it's something that vscode currently needs?
It looks like it started in rev 1.66 on my Linux systems.
I uninstalled and installed 1.65 from here:
https://code.visualstudio.com/updates/v1_65
For me the "--disable-extensions --disable-gpu" options worked.
Just install an old version of VS Code.
I use version 1.59.1 and I don't have a white screen anymore when I use sudo.

I receive error 1 message when trying to run makepkg -sic for yay

I cloned yay through git clone https://aur.archlinux.org/yay.git. I Enter the directory and run makepkg -sic but I unfortunately get the error:
==> Making package: yay 10.1.0-1 (Mon 26 Oct 2020 06:25:36 AM +0330)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading yay-10.1.0.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 118 100 118 0 0 97 0 0:00:01 0:00:01 --:--:-- 97
100 339k 100 339k 0 0 103k 0 0:00:03 0:00:03 --:--:-- 168k
==> Validating source files with sha256sums...
yay-10.1.0.tar.gz ... Passed
==> Extracting sources...
-> Extracting yay-10.1.0.tar.gz with bsdtar
==> Starting build()...
go build -v -trimpath -mod=readonly -modcacherw -ldflags '-s -w -extldflags "-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" -X "main.yayVersion=10.1.0" -X "main.localePath=/usr/share/locale/"' -buildmode=pie -o yay
go: github.com/Jguer/go-alpm/v2#v2.0.1: Get "https://gocenter.io/github.com/%21jguer/go-alpm/v2/#v/v2.0.1.mod": dial tcp 35.230.74.213:443: i/o timeout
make: *** [Makefile:127: yay] Error 1
==> ERROR: A failure occurred in build().
Aborting...
Are you getting the error consistently? If so, it looks like the host you are using to build does not have access to GoCenter.
exec: "gcc": executable file not found in $PATH
check prerequisites. see https://wiki.archlinux.org/index.php/Ar … Repository
But most of the time there is a problem with gcc, which can be solved in the following way :
pamac install base-devel
choose a gcc number from list

Perl module WWW:RobotRules won't install

Originally, I wanted to install XML::Parser::Expat module which gave a message Tests succeeded but one dependency not OK (LWP::UserAgent) which also when tried to install it give a message about one dependency not OK (WWW::RobotRules); additionally test harness failed.
Now installing WWW::RobotRules will give me:
""Test Summary Report
-------------------
t/rules-dbm.t (Wstat: 0 Tests: 13 Failed: 1)
Failed test: 12
Files=2, Tests=63, 0 wallclock secs ( 0.01 usr 0.02 sys + 0.03 cusr 0.04 csys = 0.10 CPU)
Result: FAIL
Failed 1/2 test programs. 1/63 subtests failed.
make: *** [Makefile:840: test_dynamic] Error 255
GAAS/WWW-RobotRules-6.02.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports GAAS/WWW-RobotRules-6.02.tar.gz
How can I solve this problem?
Regards,
[Edited]
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 28 Jul 2020 01:41:03 GMT
Running install for module 'WWW::RobotRules'
Checksum for /root/.cpan/sources/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz ok
Configuring G/GA/GAAS/WWW-RobotRules-6.02.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for WWW::RobotRules
Writing MYMETA.yml and MYMETA.json
GAAS/WWW-RobotRules-6.02.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for G/GA/GAAS/WWW-RobotRules-6.02.tar.gz
cp lib/WWW/RobotRules/AnyDBM_File.pm blib/lib/WWW/RobotRules/AnyDBM_File.pm
cp lib/WWW/RobotRules.pm blib/lib/WWW/RobotRules.pm
Manifying 2 pod documents
GAAS/WWW-RobotRules-6.02.tar.gz
/usr/bin/make -- OK
Running make test for GAAS/WWW-RobotRules-6.02.tar.gz
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/rules-dbm.t .. Failed 1/13 subtests
t/rules.t ...... ok
This is verbose to make test
t/rules-dbm.t ..
1..13
ok 1
Rules: /aas /per /god /old
ok 2
Rules:
ok 3
No visits: 2
Last visit: 1595923839
Fresh until: 1627459829
ok 4
ok 5
ok 6
Agent-Name: myrobot
ok 7
*** Dump of database ***
|ua-name| myrobot
www.aas.no:80|vis 3; 1595923839; Tue Jul 28 17:10:39 2020
www.sn.no:80|vis 1; 1595923829; Tue Jul 28 17:10:29 2020
www.aas.no:80|exp 1627459829; Wed Jul 28 17:10:29 2021
******
ok 8
ok 9
ok 10
ok 11
not ok 12
*** Dump of database ***
|ua-name| MOMSpider
www.sn.no:8080|r2 /bar
www.sn.no:8080|exp 1595923832; Tue Jul 28 17:10:32 2020
www.sn.no:8080|r1 /foo
******
No agent name specified at t/rules-dbm.t line 122.
ok 13
Failed 1/13 subtests
t/rules.t ......
1..50
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
ok 15
ok 16
ok 17
ok 18
ok 19
ok 20
ok 21
ok 22
ok 23
ok 24
ok 25
ok 26
ok 27
ok 28
ok 29
ok 30
ok 31
ok 32
ok 33
ok 34
ok 35
ok 36
ok 37
ok 38
ok 39
ok 40
ok 41
ok 42
ok 43
ok 44
ok 45
ok 46
ok 47
ok 48
ok 49
ok 50
ok
Test Summary Report
-------------------
t/rules-dbm.t (Wstat: 0 Tests: 13 Failed: 1)
Failed test: 12
Files=2, Tests=63, 0 wallclock secs ( 0.00 usr 0.03 sys + 0.01 cusr 0.06 csys = 0.10 CPU)
Result: FAIL
For some reason the sleep function is not working. I replaced this line in t/rules-dbm.t to an alternative waiting function.
sleep(5) to select(undef, undef, undef, 5)
However, I didn't know the reason. I tried sleep() in a new code and only sleep() would give unlimited waiting time but whaterver seconds I wrote (e.g. 3000000000000) it didn't wait and excuted the following line immediatley. I wish if someone knows the reason to tell me.

Maple: command to simplify fraction

Why doesn't Maple simplify a fraction like
-sqrt(5)*(5+sqrt(5))/120
to (-1-sqrt(5))/24 ?
Are there any commands to do this?
A suitable command for this is radnormal.
ee:=-sqrt(5)*(5+sqrt(5))/120;
1 (1/2) / (1/2)\
ee := - --- 5 \5 + 5 /
120
radnormal( ee );
1 1 (1/2)
- -- - -- 5
24 24
There are a few others which can get the form (at least for this particular example).
expand( ee );
1 1 (1/2)
- -- - -- 5
24 24
evala(Normal( ee ));
1 1 (1/2)
- -- - -- 5
24 24
Note that the distribution of the factor 1/24 is done here by Maple as an automatic simplification (and which is usually difficult to disable or awkward to avoid). Notice how delayed evaluation won't prevent it.
'(-1-sqrt(5))/24';
1 1
- -- - -- sqrt(5)
24 24

Perl WordNet::Similarity installation issue

I have tried with ActiveState and Strawberry but I get the same error message every time I run
cpan install WordNet::Similarity
Shortend it down to this output:
C:\strawberry\perl\bin\perl.exe "-Iblib\arch" "-Iblib\lib" build/Depthfiles.PL b
lib\lib/WordNet/synsetdepths.dat
Generating default depth files.
Loading WordNet::QueryData... done
Finding depths of noun taxonomies... (getSense) Internal error: offset=00002342
pos=n at C:/strawberry/perl/site/lib/WordNet/QueryData.pm line 633, <GEN8> line
1.
Compilation failed in require at build/Depthfiles.PL line 27, <GEN8> line 1.
dmake.exe: Error code 255, while making 'blib\lib\WordNet\synsetdepths.dat'
TPEDERSE/WordNet-Similarity-2.05.tar.gz
C:\strawberry\c\bin\dmake.exe -- NOT OK
CPAN: YAML::XS loaded ok (v0.41)
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Stopping: 'install' failed for 'WordNet::Similarity'.
Earlier I had the problem that WordNet was missing some .dat files, but that I solved by the help of Ted Pedersen mail archive. But this one really got me stuck. Anyone have any idea?
UPDATE:
Okay, I'm working in Ubuntu now but now I got a different problem:
# Failed test at t/trace.t line 141.
# got: '4'
# expected: '0'
# lesk: The lines 'Overlaps: 1 x "the" 1 x "small" 1 x "of" 2 x "any" 1 x "in the" 1 x "or" 1 x "resembling the" 1 x "and" ' and 'Overlaps: 1 x "the" 1 x "small" 1 x "in the" 1 x "or" 1 x "of" 1 x "resembling the" 2 x "any" 1 x "and" ' differ
t/trace.t ......... 107/132 # Looks like you failed 1 test of 132.
t/trace.t ......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/132 subtests
t/vector.t ........ ok
t/vector_pairs.t .. ok
t/wn30loop.t ...... ok
t/wup.t ........... ok
Test Summary Report
-------------------
t/trace.t (Wstat: 256 Tests: 132 Failed: 1)
Failed test: 76
Non-zero exit status: 1
Files=22, Tests=2027, 136 wallclock secs ( 0.68 usr 0.05 sys + 132.59 cusr 3.44 csys = 136.76 CPU)
Result: FAIL
Failed 1/22 test programs. 1/2027 subtests failed.
make: *** [test_dynamic] Error 255
TPEDERSE/WordNet-Similarity-2.05.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports TPEDERSE/WordNet-Similarity-2.05.tar.gz
Running make install
make test had returned bad status, won't install without force
This is an unusual-looking error, but I wonder if in deleting things from WordNet you might have removed something additional? I don't work much with Windows but if you do have the option of running on Linux then I think things will go more smoothly. That said, I know it runs on Windows (have had positive reports from Strawberry and Active Perl).
So...about the only thing I can suggest is to try to reinstall WordNet on Windows, or if you can run on Linux consider doing that as I think that tends to be a fairly smooth install. I think it can be on Windows too, it's just less common I think.