cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-9831) cordova-android's 'test-build' script removes the contents of symlinked cordova-common directory
Date Tue, 10 Nov 2015 10:49:10 GMT

    [ https://issues.apache.org/jira/browse/CB-9831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14998399#comment-14998399
] 

ASF GitHub Bot commented on CB-9831:
------------------------------------

Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/238#discussion_r44392722
  
    --- Diff: spec/e2e/update.spec.js ---
    @@ -0,0 +1,96 @@
    +/*
    + Licensed to the Apache Software Foundation (ASF) under one
    + or more contributor license agreements.  See the NOTICE file
    + distributed with this work for additional information
    + regarding copyright ownership.  The ASF licenses this file
    + to you under the Apache License, Version 2.0 (the
    + "License"); you may not use this file except in compliance
    + with the License.  You may obtain a copy of the License at
    +
    + http://www.apache.org/licenses/LICENSE-2.0
    +
    + Unless required by applicable law or agreed to in writing,
    + software distributed under the License is distributed on an
    + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + KIND, either express or implied.  See the License for the
    + specific language governing permissions and limitations
    + under the License.
    + */
    +
    +var actions      = require('./helpers/projectActions.js'),
    +    shell        = require('shelljs'),
    +    fs           = require('fs'),
    +    platformOld  = { version: '4.0.0', path: 'cordova-android-old' },
    +    platformEdge = { version: getCurrentVersion(), path: '.' };
    +
    +var DOWNLOAD_TIMEOUT = 2 * 60 * 1000,
    +    UPDATE_TIMEOUT   = 30 * 1000,
    +    PLATFORM_GIT_URL = 'https://github.com/apache/cordova-android';
    +
    +function getCurrentVersion() {
    +    return fs.readFileSync('VERSION').toString().trim();
    +}
    +
    +function testUpdate(projectname, projectid, createfrom, updatefrom, doBuild, done) {
    +    actions.createProject(projectname, projectid, createfrom.path, function (error) {
    +        expect(error).toBe(null);
    +        actions.updateProject(projectid, updatefrom.path, function (error) {
    +            expect(error).toBe(null);
    +            actions.getPlatformVersion(projectid, function (v) {
    +                expect(v).toEqual(updatefrom.version);
    +                if (doBuild) {
    +                    actions.buildProject(projectid, function (error) {
    +                        expect(error).toBe(null);
    +                        actions.removeProject(projectid);
    +                        done();
    +                    });
    +                } else {
    +                    actions.removeProject(projectid);
    +                    done();
    +                }
    +            });
    +        });
    +    });
    +}
    +
    +describe('preparing fixtures', function () {
    +
    +    it('cloning old platform', function (done) {
    +        shell.rm('-rf', platformOld.path);
    +        shell.exec('git clone ' + PLATFORM_GIT_URL + ' ' + platformOld.path + 
    --- End diff --
    
    I would use `--branch` option to checkout specific branch instead od doing this manually.
Also `--depth` option decreased test time dramatically. This might not work in future, when
we'll test multiple upgrade/downgrade variants (though `--no-single-branch` might help), but
for now i'd prefer to have `--depth 1` enabled.
     
    ```javascript
    var command = util.format('git clone %s --depth=1 --branch %s --single-branch %s',
        PLATFORM_GIT_URL, platformOld.version, platformOld.path);
    ```


> cordova-android's 'test-build' script removes the contents of symlinked cordova-common
directory
> ------------------------------------------------------------------------------------------------
>
>                 Key: CB-9831
>                 URL: https://issues.apache.org/jira/browse/CB-9831
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: Master
>            Reporter: Alexander Sorokin
>            Assignee: Alexander Sorokin
>
> when cordova-common directory is symlinked by coho, cordova-android's 'test-build' script
removes all its contents
> Windows repro:
> {noformat}
> cordova-coho\coho npm-link
> cd cordova-android
> npm run test-build
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message