Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: ports/devenv/tests/devenv_small_test.js

Issue 1563073002: Re-enable io2014 + add cds2014 tests for devenv. (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: fix Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ports/devenv/tests/demo2014_test.js ('k') | ports/devenv/tests/io2014_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* globals TEST_F, chrometest, DevEnvTest */ 7 /* globals TEST_F, chrometest, DevEnvTest */
8 8
9 'use strict'; 9 'use strict';
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return Promise.resolve().then(function() { 43 return Promise.resolve().then(function() {
44 return self.writeFile( 44 return self.writeFile(
45 '/home/user/bar.sh', 45 '/home/user/bar.sh',
46 '#!/bin/sh\necho "resolute urgency"\n'); 46 '#!/bin/sh\necho "resolute urgency"\n');
47 }).then(function() { 47 }).then(function() {
48 return self.checkCommand( 48 return self.checkCommand(
49 '/home/user/bar.sh', 0, 'resolute urgency\n'); 49 '/home/user/bar.sh', 0, 'resolute urgency\n');
50 }); 50 });
51 }); 51 });
52 52
53 // Confirm that we can run a command, sleep, and kill it.
54 TEST_F(DevEnvTest, 'testSleepKill', function() {
55 var self = this;
56 var pid;
57 return Promise.resolve().then(function() {
58 return self.spawnCommand('bash -c "while [[ 1 == 1 ]]; do echo -n; done"');
59 }).then(function(msg) {
60 pid = msg.pid;
61 return chrometest.sleep(300);
62 }).then(function(msg) {
63 self.sigint();
64 return self.waitCommand(pid);
65 }).then(function(msg) {
66 ASSERT_EQ(128 + 9, msg.status, 'Expect kill status');
67 });
68 });
69
53 // Run a NaCl executable to make sure syscalls are working. 70 // Run a NaCl executable to make sure syscalls are working.
54 TEST_F(DevEnvTest, 'testCTests', function() { 71 TEST_F(DevEnvTest, 'testCTests', function() {
55 var self = this; 72 var self = this;
56 return Promise.resolve().then(function() { 73 return Promise.resolve().then(function() {
57 return self.checkCommand('geturl ' + 74 return self.checkCommand('geturl ' +
58 chrometest.harnessURL('devenv_small_test.zip') + 75 chrometest.harnessURL('devenv_small_test.zip') +
59 ' devenv_small_test.zip', 0); 76 ' devenv_small_test.zip', 0);
60 }).then(function() { 77 }).then(function() {
61 return self.checkCommand('unzip devenv_small_test.zip', 0); 78 return self.checkCommand('unzip devenv_small_test.zip', 0);
62 }).then(function() { 79 }).then(function() {
63 return self.checkCommand( 80 return self.checkCommand(
64 'LD_LIBRARY_PATH=${PWD}/${PACKAGE_LIB_DIR}:$LD_LIBRARY_PATH ' + 81 'LD_LIBRARY_PATH=${PWD}/${PACKAGE_LIB_DIR}:$LD_LIBRARY_PATH ' +
65 './devenv_small_test_${NACL_BOOT_ARCH}', 0); 82 './devenv_small_test_${NACL_BOOT_ARCH}', 0);
66 }); 83 });
67 }); 84 });
OLDNEW
« no previous file with comments | « ports/devenv/tests/demo2014_test.js ('k') | ports/devenv/tests/io2014_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698