Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Modify test TestGbBuildSubPackageOfCmd to show that gb generate on subdirs of cmd. #565

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ldm5180
Copy link

@ldm5180 ldm5180 commented Feb 9, 2016

Problem:
For subdirectories of src/cmd, running gb generate fails to
import:

```
--- FAIL: TestGbBuildSubPackageOfCmd (0.06s)
    gb_test.go:179: running /tmp/testgb347664536/testgb [generate]
    gb_test.go:193: standard error:
    gb_test.go:194: can't load package: package cmd/hello: open /usr/lib/go/src/cmd/hello: no such file or directory
        FATAL: command "generate" failed: exit status 1

    gb_test.go:203: gb [generate] failed unexpectedly: exit status 1
```

It appears that the ```gb generate``` import path only includes
$GB_GOROOT.

Proposed solution:
Add $GB_PROJECT_DIR to the import search path for gb generate.

Issue: ##564
Original issue: #492

…ate``` on subdirs of ```cmd```.

Problem:
    For subdirectories of ```src/cmd```, running ```gb generate``` fails to
    import:

    ```
    --- FAIL: TestGbBuildSubPackageOfCmd (0.06s)
        gb_test.go:179: running /tmp/testgb347664536/testgb [generate]
        gb_test.go:193: standard error:
        gb_test.go:194: can't load package: package cmd/hello: open /usr/lib/go/src/cmd/hello: no such file or directory
            FATAL: command "generate" failed: exit status 1

        gb_test.go:203: gb [generate] failed unexpectedly: exit status 1
    ```

    It appears that the ```gb generate``` import path only includes
    $GB_GOROOT.

Proposed solution:
    Add $GB_PROJECT_DIR to the import search path for ```gb generate```.

Issue: #constabulary#564
Original issue: constabulary#492
@davecheney
Copy link
Contributor

Thanks for this PR, this change does not appear to do what it says in the description. Did you forget to add some files ?

@ldm5180
Copy link
Author

ldm5180 commented Feb 9, 2016

This is not a fix. It is simply an addition to the test to cause the test to fail. The test failure can be seen here: https://travis-ci.org/constabulary/gb/jobs/108091819#L651

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants