PKGBUILD updates and some testing fixes
This commit is contained in:
parent
d4a1aabfdc
commit
4310ab7323
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
./helloworld
|
||||
./helloworld.class
|
||||
./helloworld.exe
|
||||
helloworld
|
||||
helloworld.class
|
||||
HelloWorld.exe
|
||||
tests/__pycache__/*
|
||||
|
@ -22,7 +22,9 @@ namespace AniNIX {
|
||||
Console.WriteLine("Hello world!");
|
||||
}
|
||||
|
||||
// Main
|
||||
/// <summary>
|
||||
/// Code entry point
|
||||
/// </summary>
|
||||
public static void Main(string[] args) {
|
||||
HelloWorld.PrintHelloWorld();
|
||||
return;
|
10
Makefile
10
Makefile
@ -1,7 +1,9 @@
|
||||
compile: c cs java bash php perl python
|
||||
pkgdirname != basename `git config remote.origin.url` | sed 's/.git$$//'
|
||||
|
||||
install: compile
|
||||
@echo This project cannot be installed.
|
||||
install: clean
|
||||
mkdir -p ${pkgdir}/opt/aninix/${pkgdirname}/
|
||||
rsync -avz --exclude=Makefile --exclude=LICENSE --exclude=.git* --exclude=README . * ${pkgdir}/opt/aninix/${pkgdirname}/
|
||||
|
||||
test: compile
|
||||
python3 -m pytest
|
||||
@ -39,5 +41,5 @@ perl: helloworld.pl /usr/bin/perl
|
||||
python: helloworld.py /usr/bin/python3
|
||||
#python3 ./helloworld.py
|
||||
|
||||
cs: helloworld.cs /usr/bin/mono /usr/bin/mcs
|
||||
mcs helloworld.cs
|
||||
cs: HelloWorld.cs /usr/bin/mono /usr/bin/mcs
|
||||
mcs HelloWorld.cs
|
||||
|
16
PKGBUILD
16
PKGBUILD
@ -1,21 +1,21 @@
|
||||
# Maintainer: Shikoba Kage <darkfeather@aninix.net>
|
||||
pkgname=cryptoworkbench
|
||||
pkgver=0.1.ac4a8cb406377081eb1c1de2a3abe482508d6f57
|
||||
pkgname=aninix-helloworld
|
||||
pkgver=0.1.1
|
||||
pkgver() {
|
||||
printf "0.1.""$(git rev-parse HEAD)"
|
||||
}
|
||||
pkgrel=1
|
||||
epoch=
|
||||
pkgdesc="AniNIX::CryptoWorkbench \\\\ Simple Cryptography Utility"
|
||||
pkgdesc="AniNIX::HelloWorld \\\\ Sample HelloWorld Source"
|
||||
arch=("x86_64")
|
||||
url="https://aninix.net/foundation/CryptoWorkbench"
|
||||
url="https://aninix.net/foundation/HelloWorld"
|
||||
license=('custom')
|
||||
groups=()
|
||||
depends=('mono>=5.0.0' 'curl' 'grep' 'bash>=4.4' 'git>=2.13')
|
||||
makedepends=('make>=4.2')
|
||||
depends=('bash>=4.4')
|
||||
makedepends=('make>=4.2' 'mono>5.0.0' 'php' 'perl' 'java-environment' 'python>=3.7' 'gcc')
|
||||
checkdepends=()
|
||||
optdepends=()
|
||||
provides=('cryptoworkbench')
|
||||
provides=('aninix-helloworld')
|
||||
conflicts=()
|
||||
replaces=()
|
||||
backup=()
|
||||
@ -36,7 +36,7 @@ build() {
|
||||
}
|
||||
|
||||
check() {
|
||||
printf 'quit\n\n' | make -C "${srcdir}/.." test
|
||||
make -C "${srcdir}/.." test
|
||||
}
|
||||
|
||||
package() {
|
||||
|
@ -12,11 +12,11 @@
|
||||
### <summary>
|
||||
### Prints 'Hello world!'
|
||||
### </summary>
|
||||
function helloWorld() {
|
||||
function main() {
|
||||
printf "Hello world!\n"
|
||||
}
|
||||
|
||||
## MAIN
|
||||
if [ `echo "$0" | egrep '(^|/)helloworld.bash'` ]; then
|
||||
helloWorld
|
||||
if [ `basename "$0"` == "helloworld.bash" ]; then
|
||||
main
|
||||
fi
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
print('Hello World!\n');
|
||||
print('Hello world!');
|
||||
|
Binary file not shown.
@ -2,14 +2,64 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
|
||||
def checkOutput(output):
|
||||
for line in output.split('\n'):
|
||||
if line == 'Hello world!': return True
|
||||
return False
|
||||
# c cs java bash php perl python
|
||||
|
||||
def CheckOutput(output):
|
||||
return output == 'Hello world!\n'
|
||||
|
||||
def test_c():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("./helloworld", mode='r', buffering=-1)
|
||||
fh = os.popen("make c &>/dev/null; ./helloworld", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and checkOutput(output)
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_cs():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("make cs &>/dev/null; mono ./HelloWorld.exe", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_java():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("make java &>/dev/null; java helloworld", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_bash():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("bash ./helloworld.bash", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_bash():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("bash ./helloworld.bash", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_perl():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("perl ./helloworld.pl", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_php():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("php ./helloworld.php", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_python():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("python3 ./helloworld.py", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user