mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
fix Cakefile test task
This commit is contained in:
parent
fb304c673c
commit
7e5e9f9f5f
1 changed files with 8 additions and 12 deletions
|
@ -12,16 +12,6 @@ FILES = [
|
|||
OUTFILE = 'build/snowflake.coffee'
|
||||
STATIC = 'static'
|
||||
|
||||
task 'test', 'snowflake unit tests', ->
|
||||
testFile = 'test/snowflake.bundle.coffee'
|
||||
exec 'cat ' + FILES.join(' ') + ' snowflake_test.coffee | cat > ' +
|
||||
testFile, (err, stdout, stderr) ->
|
||||
throw err if err
|
||||
console.log stdout + stderr
|
||||
exec 'coffee ' + testFile + ' -v', (err, stdout, stderr) ->
|
||||
throw err if err
|
||||
console.log stdout + stderr
|
||||
|
||||
concatCoffeeFiles = -> exec 'cat ' + FILES.join(' ') + ' | cat > ' + OUTFILE
|
||||
|
||||
copyStaticFiles = -> exec 'cp ' + STATIC + '/* build/'
|
||||
|
@ -30,10 +20,16 @@ compileCoffee = ->
|
|||
exec 'coffee -o build -c build/snowflake.coffee', (err, stdout, stderr) ->
|
||||
throw err if err
|
||||
|
||||
task 'build:concat', 'concatenate coffeescript files.', concatCoffeeFiles
|
||||
task 'test', 'snowflake unit tests', ->
|
||||
exec 'mkdir -p test'
|
||||
testFile = 'test/snowflake.bundle.coffee'
|
||||
exec 'cat ' + FILES.join(' ') + ' snowflake_test.coffee | cat > ' + testFile
|
||||
exec 'coffee ' + testFile + ' -v', (err, stdout, stderr) ->
|
||||
throw err if err
|
||||
console.log stdout + stderr
|
||||
|
||||
task 'build', 'build the snowflake proxy', ->
|
||||
exec 'mkdir build'
|
||||
exec 'mkdir -p build'
|
||||
concatCoffeeFiles()
|
||||
copyStaticFiles()
|
||||
compileCoffee()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue