[Pkg-javascript-devel] Bug#802735: nodejs: add autopkgtests

2015-10-26 Thread Jérémy Lal
2015-10-26 23:24 GMT+01:00 Jérémy Lal :

>
>
> 2015-10-26 23:22 GMT+01:00 dann frazier :
>
>> On Fri, Oct 23, 2015 at 09:14:54AM +0200, Jérémy Lal wrote:
>> > 2015-10-23 2:32 GMT+02:00 dann frazier :
>> >
>> > > Source: nodejs
>> > > Version: 4.0.0~dfsg-2
>> > > Severity: wishlist
>> > > Tags: patch
>> > >
>> > > Attached is a patch to add a couple simple autopkgtests to nodejs.
>> > >
>> >
>> > Hello,
>> > beside a very simple test like
>> > nodejs -e "console.log('test');"
>>
>> The attached patch should do that.
>>
>> > i don't see the point of testing further since hundreds of tests are
>> > already run
>> > during package build.
>>
>> I could also wrap those tests up to run against the host binary - is
>> that something you'd be interested in including?
>>
>> fyi, my goal is to be able to run tests against an existing binary
>> package to make sure there are no issues due to an ancillary software
>> update (e.g. kernel).
>>
>>
> Don't bother. It is true that autopkgtests have different use cases than
> tests done
> during build. I'll apply your patch as is.
>


Ha, spoke too fast (there should be an acronym for that).

Maybe pure upstream js tests could be part of autopkgtests, because they
just
require source package with patches applied + nodejs runtime.
The only (solvable) problem is to pass correct cpu param to the test suite.
That would separate building from testing, which is often a problem on
buildd
servers where slowdowns can make some tests timeout. Maybe also more
control over autopkgtest environment could enable more tests (ipv6, tty).

I'll look into it before next upstream release.

Jérémy
___
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

[Pkg-javascript-devel] Bug#802735: nodejs: add autopkgtests

2015-10-23 Thread Jérémy Lal
2015-10-23 2:32 GMT+02:00 dann frazier :

> Source: nodejs
> Version: 4.0.0~dfsg-2
> Severity: wishlist
> Tags: patch
>
> Attached is a patch to add a couple simple autopkgtests to nodejs.
>

Hello,
beside a very simple test like
nodejs -e "console.log('test');"
i don't see the point of testing further since hundreds of tests are
already run
during package build.

Jérémy.
___
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

[Pkg-javascript-devel] Bug#802735: nodejs: add autopkgtests

2015-10-22 Thread dann frazier
Source: nodejs
Version: 4.0.0~dfsg-2
Severity: wishlist
Tags: patch

Attached is a patch to add a couple simple autopkgtests to nodejs.
diff -urpN nodejs-4.0.0~dfsg.orig/debian/control nodejs-4.0.0~dfsg/debian/control
--- nodejs-4.0.0~dfsg.orig/debian/control	2015-09-09 08:10:12.0 -0600
+++ nodejs-4.0.0~dfsg/debian/control	2015-10-22 18:06:56.136009351 -0600
@@ -25,6 +25,7 @@ Standards-Version: 3.9.6
 Homepage: http://nodejs.org/
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nodejs.git
 Vcs-Git: git://anonscm.debian.org/collab-maint/nodejs.git
+Testsuite: autopkgtest
 
 Package: nodejs-dev
 Section: devel
diff -urpN nodejs-4.0.0~dfsg.orig/debian/tests/control nodejs-4.0.0~dfsg/debian/tests/control
--- nodejs-4.0.0~dfsg.orig/debian/tests/control	1969-12-31 17:00:00.0 -0700
+++ nodejs-4.0.0~dfsg/debian/tests/control	2015-10-22 18:21:37.044234074 -0600
@@ -0,0 +1,6 @@
+Tests: helloworld
+Depends: nodejs, wget
+Restrictions: isolation-container
+
+Test-Command: nodejs -v
+Depends: nodejs
diff -urpN nodejs-4.0.0~dfsg.orig/debian/tests/helloworld nodejs-4.0.0~dfsg/debian/tests/helloworld
--- nodejs-4.0.0~dfsg.orig/debian/tests/helloworld	1969-12-31 17:00:00.0 -0700
+++ nodejs-4.0.0~dfsg/debian/tests/helloworld	2015-10-22 18:30:21.857426281 -0600
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+set -e
+
+TIMEOUT=60 # in seconds
+PORT=1337
+
+js=$(mktemp)
+cleanup() {
+rm -f $js
+}
+trap cleanup EXIT
+
+# "hello world" example from: https://nodejs.org/en/about/
+cat > $js &2
+	kill $nodepid
+	exit 1
+fi
+done
+
+echo "ERROR: nodejs exited unexpectedly" >&2
+
+exit 1
___
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel