Skip to content

Commit

Permalink
Merge pull request #416 from JrGoodle/test-cleanup
Browse files Browse the repository at this point in the history
Test cleanup
  • Loading branch information
JrGoodle committed Apr 18, 2020
2 parents 29d1488 + 3b966bc commit 6b93269
Show file tree
Hide file tree
Showing 31 changed files with 394 additions and 552 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ jobs:
- run:
name: upload code coverage results
command: |
coverage combine examples/cats examples/cocos2d-objc examples/llvm-projects examples/swift-projects
coverage combine examples/cats examples/llvm-projects examples/swift-projects
aws s3 cp .coverage "s3://clowder-coverage/coverage/circleci/$CIRCLE_BUILD_NUM/"
codecov -X gcov
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ examples/fastlane/clowder.yaml
examples/fastlane/fastlane
examples/fastlane/snapshot

examples/cocos2d-objc/clowder
examples/cocos2d-objc/.clowder
examples/cocos2d-objc/clowder.yaml
examples/cocos2d-objc/peru.yaml
examples/cocos2d-objc/cocos2d-objc
examples/cocos2d-objc/cocos2d-x


# Created by https://www.gitignore.io/api/macos,swift,xcode,vapor,python,swiftpm,pycharm

### macOS ###
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
- env: TARGET="parallel"
python: 3.7
script: clowder-test -c parallel
# - env: TARGET="cocos2d"
# script: clowder-test -c cocos2d all
# - env: TARGET="swift"
# script: clowder-test -c swift all

Expand Down
17 changes: 6 additions & 11 deletions clowder_test/clowder_test/cli/base_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ class Meta:
def all(self):
"""clowder test all command"""

scripts = ['./test_example_cats.sh', './test_example_cocos2d.sh',
'./test_example_llvm.sh', './test_example_swift.sh']
scripts = [
'./test_example_cats.sh',
'./test_example_llvm.sh',
'./test_example_swift.sh'
]
for script in scripts:
execute_test_command(script, self.path,
parallel=self.app.pargs.parallel,
Expand Down Expand Up @@ -100,7 +103,7 @@ def unittests(self):
def write(self):
"""clowder write tests"""

cats_scripts = ['./write_herd.sh', './write_prune.sh', './write_repo.sh', './write_start.sh']
cats_scripts = ['./write_herd.sh', './write_protocol.sh', './write_prune.sh', './write_repo.sh', './write_start.sh']
for script in cats_scripts:
execute_test_command(script, os.path.join(self.path, 'cats'),
parallel=self.app.pargs.parallel,
Expand All @@ -118,14 +121,6 @@ def write(self):
# debug=self.app.debug,
# quiet=self.app.pargs.silent)

# execute_test_command('./write_protocol.sh', os.path.join(self.path, 'cocos2d'),
# parallel=self.app.pargs.parallel,
# write=True,
# coverage=self.app.pargs.coverage,
# debug=self.app.debug,
# quiet=self.app.pargs.silent,
# ssh=True)

# execute_test_command('./write_configure_remotes.sh', os.path.join(self.path, 'swift'),
# parallel=self.app.pargs.parallel,
# write=True,
Expand Down
24 changes: 24 additions & 0 deletions clowder_test/clowder_test/cli/cats_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def herd_branch(self):

self._execute_command('./herd_branch.sh', self.path)

@expose(
help='Run cats herd submodules tests'
)
def herd_submodules(self):
"""clowder cats herd submodules tests"""

self._execute_command('./herd_submodules.sh', self.path)

@expose(
help='Run cats herd tag tests'
)
Expand Down Expand Up @@ -123,6 +131,14 @@ def link(self):

self._execute_command('./link.sh', self.path)

@expose(
help='Run cats protocol tests'
)
def protocol(self):
"""clowder cats protocol tests"""

self._execute_command('./protocol.sh', self.path)

@expose(
help='Run cats prune tests'
)
Expand Down Expand Up @@ -155,6 +171,14 @@ def save(self):

self._execute_command('./save.sh', self.path)

@expose(
help='Run cats skip tests'
)
def skip(self):
"""clowder cats skip tests"""

self._execute_command('./skip.sh', self.path)

@expose(
help='Run cats start tests'
)
Expand Down
78 changes: 0 additions & 78 deletions clowder_test/clowder_test/cli/cocos2d_controller.py

This file was deleted.

2 changes: 0 additions & 2 deletions clowder_test/clowder_test/clowder_test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from clowder_test import ROOT_DIR
from clowder_test.cli.base_controller import BaseController
from clowder_test.cli.cats_controller import CatsController
from clowder_test.cli.cocos2d_controller import Cocos2dController
from clowder_test.cli.llvm_controller import LLVMController
from clowder_test.cli.swift_controller import SwiftController
from clowder_test.execute import execute_command
Expand All @@ -38,7 +37,6 @@ class Meta:
handlers = [
BaseController,
CatsController,
Cocos2dController,
LLVMController,
SwiftController
]
Expand Down
4 changes: 2 additions & 2 deletions docs/clowder-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sources:

The `groups` each require a `name` and associated `projects`

At a minimum, `projects` require the `name` from the project's url, and the `path` to clone relative to the base directory. The default `remote`, `source`, `ref`, `depth`, and `timestamp_author` values can be overridden on a per-project basis. It's also possible to add a reference to a fork by adding `fork` to a project, with a required `name` and `remote`. When a `fork` is present the `clowder start -t`, `clowder prune -r`, and `clowder prune -a` commands will apply to the fork's remote
At a minimum, `projects` require the `name` from the project's url, and the `path` to clone relative to the base directory. The default `remote`, `source`, `ref`, `depth`, and `timestamp_author` (most recent commit by author) values can be overridden on a per-project basis. It's also possible to add a reference to a fork by adding `fork` to a project, with a required `name` and `remote`. When a `fork` is present the `clowder start -t`, `clowder prune -r`, and `clowder prune -a` commands will apply to the fork's remote

```yaml
groups:
Expand Down Expand Up @@ -87,7 +87,7 @@ ref: 3416108abd0df3997a533a14c5ad06de20ba8a60 # point to commit hash

A `clowder.yaml` file can `import` another `clowder.yaml` file and override values from the other file, add new `groups`, and add new `projects`. If a file contains an `import`, then the normal requirements for a base `clowder.yaml` are relaxed. There must be at least one additional customization specified for a `clowder.yaml` with an `import` to be considered valid. To import the primary `clowder.yaml` specify `default`, otherwise specify the version name

The [swift-4.1-branch-import clowder.yaml](https://github.com/JrGoodle/swift-clowder/blob/master/versions/swift-4.1-branch-import/clowder.yaml) file demonstrates `import` usage. This version will import the primary `clowder.yaml` and override the default `ref` with `refs/heads/swift-4.1-branch`. The `llvm` group `ref` also requires an override since it was specified to be `refs/heads/stable` in the [default clowder.yaml](https://github.com/JrGoodle/swift-clowder/blob/master/clowder.yaml)
The [swift-4.1-branch-import clowder.yaml](https://github.com/JrGoodle/swift-clowder/blob/master/versions/swift-4.1-branch/clowder.yaml) file demonstrates `import` usage. This version will import the primary `clowder.yaml` and override the default `ref` with `refs/heads/swift-4.1-branch`. The `llvm` group `ref` also requires an override since it was specified to be `refs/heads/stable` in the [default clowder.yaml](https://github.com/JrGoodle/swift-clowder/blob/master/clowder.yaml)

```yaml
import default
Expand Down
1 change: 0 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Examples

- [cats Example](cats)
- [cocos2d Example](cocos2d-objc)
- [llvm Example](llvm-projects)
- [plugin Example](plugins)
- [swift Example](swift-projects)
14 changes: 0 additions & 14 deletions examples/cocos2d-objc/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions examples/cocos2d-objc/clean.sh

This file was deleted.

9 changes: 0 additions & 9 deletions examples/cocos2d-objc/init.sh

This file was deleted.

2 changes: 1 addition & 1 deletion script/travis/after_script
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

cd "$TRAVIS_BUILD_DIR" || exit 1
coverage combine examples/cats examples/cocos2d-objc examples/llvm-projects examples/swift-projects
coverage combine examples/cats examples/llvm-projects examples/swift-projects
codecov
./cc-test-reporter format-coverage --output "coverage/codeclimate.$TRAVIS_JOB_NUMBER.json"
mv .coverage "coverage/.coverage.$TRAVIS_OS_NAME.$TARGET"
Expand Down
2 changes: 1 addition & 1 deletion src/clowder/clowder_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Meta:
cmd.StatusController,
cmd.SyncController,
cmd.YAMLController
]
]


def main():
Expand Down
15 changes: 9 additions & 6 deletions src/clowder/git/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,15 @@ def print_branches(self, local=False, remote=False):
else:
return

try:
execute_command(command, self.repo_path, print_output=self._print_output)
except ClowderError:
message = colored(' - Failed to print branches', 'red')
self._print(message)
self._exit(message)
print('FIXME: Implement')
return

# try:
# execute_command(command, self.repo_path, print_output=self._print_output)
# except ClowderError:
# message = colored(' - Failed to print branches', 'red')
# self._print(message)
# self._exit(message)

@not_detached
def pull(self):
Expand Down
3 changes: 0 additions & 3 deletions test/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
- Test invalid yaml files
- Test `clowder.yaml` file with an import
- Test all clowder commands

## [test_example_cocos2d.sh](test_example_cocos2d.sh)

- Test submodules

## [test_example_llvm.sh](test_example_llvm.sh)
Expand Down

0 comments on commit 6b93269

Please sign in to comment.