Skip to content

Commit

Permalink
fix install bug when using command line (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhe123 authored Aug 6, 2019
1 parent 9fd1cbb commit 3c08b5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ validate-lint:
@npm run validate-lint

integration-test:
echo "@mocha $(TEST_FOLDER) -t $(TIMEOUT) -R spec --recursive -name $(TEST_FILES) --grep ^Integration::"
@mocha $(TEST_FOLDER) -t $(TIMEOUT) -R spec --recursive -name $(TEST_FILES) --grep ^Integration::

unit-test:
echo "@mocha $(TEST_FOLDER) -t $(TIMEOUT) -R spec --recursive -name $(TEST_FILES) --grep '^(?!Integration::).*'"
@mocha $(TEST_FOLDER) -t $(TIMEOUT) -R spec --recursive -name $(TEST_FILES) --grep '^(?!Integration::).*'

test: lint unit-test
Expand Down
4 changes: 2 additions & 2 deletions lib/install/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ async function installPackage(runtime, pkgType, pkgName, options) {

case 'apt':
await new AptTask(options.name, runtime, options.codeUri,
pkgName, options.local, options.env, ctx, options.verbose).run();
pkgName, options.local, null, options.env, ctx, options.verbose).run();
break;
case 'pip':
await new PipTask(options.name, runtime, options.codeUri,
pkgName, options.local, options.env, ctx, options.verbose).run();
pkgName, options.local, null, options.env, ctx, options.verbose).run();
break;
case 'module':
// TODO
Expand Down
7 changes: 4 additions & 3 deletions test/install/install.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,20 @@ chai.use(require('chai-fs'));
await installPackage('python2.7', 'apt', 'libzbar0', {
packageType: 'apt',
codeUri: funTempDir,
local: true
local: true,
env: {}
});

expect(path.join(funTempDir, '.fun/root/usr/lib/libzbar.so.0')).to.be.a.path();

});

it('install_pip', async function () {
this.timeout(20000);
await installPackage('python2.7', 'pip', 'pymssql', {
packageType: 'pip',
codeUri: funTempDir,
local: true
local: true,
env: {}
});

expect(path.join(funTempDir, '.fun/python/lib/python2.7/site-packages/pymssql.so')).to.be.a.path();
Expand Down

0 comments on commit 3c08b5c

Please sign in to comment.