mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-07 10:46:27 +02:00
added a version of piston which uses lxc instead of docker, added tests for lxc
This commit is contained in:
parent
748f438718
commit
b26d1b5b45
30 changed files with 233 additions and 0 deletions
5
tests/test.c
Normal file
5
tests/test.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include <stdio.h>
|
||||
|
||||
void main(void) {
|
||||
printf("good\n");
|
||||
}
|
6
tests/test.cpp
Normal file
6
tests/test.cpp
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include <iostream>
|
||||
|
||||
int main(void) {
|
||||
printf("good\n");
|
||||
return 1;
|
||||
}
|
9
tests/test.cs
Normal file
9
tests/test.cs
Normal file
|
@ -0,0 +1,9 @@
|
|||
using System;
|
||||
|
||||
namespace HelloWorld {
|
||||
class Hello {
|
||||
static void Main() {
|
||||
Console.WriteLine("good");
|
||||
}
|
||||
}
|
||||
}
|
7
tests/test.go
Normal file
7
tests/test.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("good")
|
||||
}
|
5
tests/test.java
Normal file
5
tests/test.java
Normal file
|
@ -0,0 +1,5 @@
|
|||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("good");
|
||||
}
|
||||
}
|
1
tests/test.js
Normal file
1
tests/test.js
Normal file
|
@ -0,0 +1 @@
|
|||
console.log('good')
|
16
tests/test.nasm
Normal file
16
tests/test.nasm
Normal file
|
@ -0,0 +1,16 @@
|
|||
SECTION .DATA
|
||||
good: db 'good',10
|
||||
txtlen: equ $-good
|
||||
|
||||
SECTION .TEXT
|
||||
GLOBAL _start
|
||||
|
||||
_start:
|
||||
mov eax,4
|
||||
mov ebx,1
|
||||
mov ecx,good
|
||||
mov edx,txtlen
|
||||
int 80h
|
||||
mov eax,1
|
||||
mov ebx,0
|
||||
int 80h
|
3
tests/test.php
Normal file
3
tests/test.php
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
echo 'good' . "\n";
|
1
tests/test.r
Normal file
1
tests/test.r
Normal file
|
@ -0,0 +1 @@
|
|||
print('good')
|
1
tests/test.rb
Normal file
1
tests/test.rb
Normal file
|
@ -0,0 +1 @@
|
|||
puts 'good'
|
1
tests/test2.py
Normal file
1
tests/test2.py
Normal file
|
@ -0,0 +1 @@
|
|||
print 'good'
|
1
tests/test3.py
Normal file
1
tests/test3.py
Normal file
|
@ -0,0 +1 @@
|
|||
print('good')
|
26
tests/test_all_lxc
Executable file
26
tests/test_all_lxc
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo 'testing c'
|
||||
../lxc/execute c test.c
|
||||
echo 'testing cpp'
|
||||
../lxc/execute cpp test.cpp
|
||||
echo 'testing cs'
|
||||
../lxc/execute cs test.cs
|
||||
echo 'testing go'
|
||||
../lxc/execute go test.go
|
||||
echo 'testing java'
|
||||
../lxc/execute java test.java
|
||||
echo 'testing asm'
|
||||
../lxc/execute asm test.nasm
|
||||
echo 'testing js'
|
||||
../lxc/execute js test.js
|
||||
echo 'testing php'
|
||||
../lxc/execute php test.php
|
||||
echo 'testing python2'
|
||||
../lxc/execute python2 test2.py
|
||||
echo 'testing python3'
|
||||
../lxc/execute python3 test3.py
|
||||
echo 'testing r'
|
||||
../lxc/execute r test.r
|
||||
echo 'testing ruby'
|
||||
../lxc/execute ruby test.rb
|
Loading…
Add table
Add a link
Reference in a new issue