This repository has been archived by the owner on Jun 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packaging and test script (remove cmake dep)
- Loading branch information
Showing
5 changed files
with
75 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
name=versioning | ||
qgisMinimumVersion=2.0 | ||
description=postgis database versioning | ||
version=0.3 | ||
version=0.4 | ||
author=Oslandia | ||
[email protected] | ||
about=A tool to manage data history, branches, and to work offline with your PostGIS-stored data and QGIS. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/python | ||
# coding=UTF-8 | ||
|
||
import os | ||
import zipfile | ||
import tempfile | ||
import shutil | ||
|
||
__currendir = os.path.dirname(__file__) | ||
files = ["README.md", "LICENSE", "metadata.txt"] | ||
for file_ in os.listdir(__currendir): | ||
if file_[-4:]==".svg" or file_[-3:]==".py" or file_[-3:]==".ui": | ||
files.append(file_) | ||
|
||
print files | ||
tmpdir = os.path.join(tempfile.gettempdir(), "qgis_versioning") | ||
print tmpdir | ||
if os.path.isdir(tmpdir): | ||
for file_ in os.listdir(tmpdir): | ||
print "remove ", file_ ,"from", tmpdir | ||
os.remove(os.path.join(tmpdir, file_)) | ||
else: | ||
print "create", tmpdir | ||
os.mkdir(tmpdir) | ||
|
||
for file_ in files: | ||
shutil.copy(os.path.join(__currendir, file_), | ||
os.path.join(tmpdir, file_)) | ||
|
||
with zipfile.ZipFile("qgis_versioning.zip", 'w') as package: | ||
for root, dirs, files in os.walk(tmpdir): | ||
for file_ in files: | ||
package.write(os.path.join(root, file_)) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/python | ||
# coding=UTF-8 | ||
|
||
import os | ||
import sys | ||
from subprocess import Popen, PIPE | ||
|
||
__currendir = os.path.dirname(__file__) | ||
tests = [] | ||
test_directories = ["test"] | ||
for dir_ in test_directories: | ||
test_dir = os.path.join(__currendir, dir_) | ||
for file_ in os.listdir(test_dir): | ||
if file_[-8:]=="_test.py": | ||
tests.append(os.path.join(test_dir, file_)) | ||
|
||
failed = 0 | ||
for i, test in enumerate(tests): | ||
sys.stdout.write("% 4d/%d %s %s"%( | ||
i+1, len(tests), test, "."*max(0, (80-len(test))))) | ||
sys.stdout.flush() | ||
child = Popen(["python", test], stdout=PIPE, stderr=PIPE) | ||
out, err = child.communicate() | ||
if child.returncode: | ||
sys.stdout.write("failed\n") | ||
failed += 1 | ||
else: | ||
sys.stdout.write("ok\n") | ||
|
||
if failed: | ||
sys.stderr.write("%d/%d test failed\n"%(failed, len(tests))) | ||
exit(1) | ||
else: | ||
sys.stdout.write("%d/%d test passed (%d%%)\n"%( | ||
len(tests)-failed, | ||
len(tests), | ||
int((100.*(len(tests)-failed))/len(tests)))) | ||
|
||
exit(0) |
This file was deleted.
Oops, something went wrong.