mirror of
https://github.com/cockpit-project/cockpit.git
synced 2026-11-03 21:49:50 -09:00
build: Put webpacked unit tests into ./qunit/
This separates the bits which we want to install from the generated QUnit tests, which should stay in the build tree. This will become relevant once we drop Makefile.deps and its WEBPACK_INSTALL variable.
This commit is contained in:
parent
e21739eb57
commit
18576f7d18
4 changed files with 6 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -53,6 +53,7 @@ Makefile.in
|
|||
/lcov/
|
||||
/mock-*
|
||||
/package-lock.json
|
||||
/qunit/
|
||||
/socket-activation-helper
|
||||
/stamp-h1
|
||||
/tags
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
# We need to avoid automake seeing this, but want it evaluated at runtime
|
||||
TESTS += $(wildcard $(srcdir)/dist/*/test-*.html)
|
||||
TESTS += $(wildcard $(srcdir)/qunit/*/test-*.html)
|
||||
|
|
|
|||
|
|
@ -722,6 +722,8 @@ server_ready (void)
|
|||
G_CALLBACK (on_handle_resource), NULL);
|
||||
g_signal_connect (server, "handle-resource::/dist/",
|
||||
G_CALLBACK (on_handle_source), NULL);
|
||||
g_signal_connect (server, "handle-resource::/qunit/",
|
||||
G_CALLBACK (on_handle_source), NULL);
|
||||
g_signal_connect (server, "handle-resource::/favicon.ico",
|
||||
G_CALLBACK (on_handle_favicon), NULL);
|
||||
g_signal_connect (server, "handle-resource::/mock/",
|
||||
|
|
|
|||
|
|
@ -253,10 +253,10 @@ if (section.startsWith('static'))
|
|||
/* Fill in the tests properly */
|
||||
info.tests.forEach(test => {
|
||||
if (!section || test.indexOf(section) === 0) {
|
||||
entry[test] = pkgfile(test + ".js");
|
||||
entry['../qunit/' + test] = pkgfile(test + ".js");
|
||||
plugins.push(new Html({
|
||||
title: path.basename(test),
|
||||
filename: test + ".html",
|
||||
filename: '../qunit/' + test + ".html",
|
||||
template: libdir + path.sep + "qunit-template.html",
|
||||
builddir: test.split("/").map(() => "../").join(""),
|
||||
script: path.basename(test + '.js'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue