11#! /usr/bin/env bash
22# See README.md for info on running these tests.
33
4+ testBuildWithUserCacheDirectoriesCamel () {
5+ cache=$( mktmpdir)
6+
7+ compile " cache-directories-camel" $cache
8+ assertCaptured " - non/existent (nothing to cache)"
9+ assertEquals " 1" " $( ls -1 $cache /node/server | grep node_modules | wc -l | tr -d ' ' ) "
10+ assertEquals " 1" " $( ls -1 $cache /node/client | grep node_modules | wc -l | tr -d ' ' ) "
11+ assertCapturedSuccess
12+
13+ compile " cache-directories-camel" $cache
14+ assertCaptured " Loading 3 from cacheDirectories"
15+ assertCaptured " - server/node_modules"
16+ assertCaptured " - client/node_modules"
17+ assertCaptured " - non/existent (not cached - skipping)"
18+ assertCapturedSuccess
19+ }
20+
421testConcurrency1X () {
522 LOG_CONCURRENCY=true MEMORY_AVAILABLE=512 capture $( pwd) /profile/nodejs.sh
623 assertCaptured " Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)"
@@ -15,6 +32,13 @@ testConcurrency2X() {
1532 assertCapturedSuccess
1633}
1734
35+ testConcurrencyPerformanceM () {
36+ LOG_CONCURRENCY=true MEMORY_AVAILABLE=2560 capture $( pwd) /profile/nodejs.sh
37+ assertCaptured " Detected 2560 MB available memory, 512 MB limit per process (WEB_MEMORY)"
38+ assertCaptured " Recommending WEB_CONCURRENCY=5"
39+ assertCapturedSuccess
40+ }
41+
1842testConcurrencyPX () {
1943 LOG_CONCURRENCY=true MEMORY_AVAILABLE=6144 capture $( pwd) /profile/nodejs.sh
2044 assertCaptured " Detected 6144 MB available memory, 512 MB limit per process (WEB_MEMORY)"
@@ -302,22 +326,9 @@ testBuildWithUserCacheDirectories() {
302326 assertCapturedSuccess
303327}
304328
305- testBuildWithUserCacheDirectoriesCamel () {
306- cache=$( mktmpdir)
307329
308- compile " cache-directories-camel" $cache
309- assertCaptured " - non/existent (nothing to cache)"
310- assertEquals " 1" " $( ls -1 $cache /node/server | grep node_modules | wc -l | tr -d ' ' ) "
311- assertEquals " 1" " $( ls -1 $cache /node/client | grep node_modules | wc -l | tr -d ' ' ) "
312- assertCapturedSuccess
313330
314- compile " cache-directories-camel" $cache
315- assertCaptured " Loading 3 from cacheDirectories"
316- assertCaptured " - server/node_modules"
317- assertCaptured " - client/node_modules"
318- assertCaptured " - non/existent (not cached - skipping)"
319- assertCapturedSuccess
320- }
331+
321332
322333testUserConfig () {
323334 compile " userconfig"
0 commit comments