WIP: Epiphany Refactor (#85)

This commit is contained in:
Lucien Greathouse
2018-08-26 01:03:53 -07:00
committed by GitHub
parent 80b9b7594b
commit 72bc77f1d5
52 changed files with 1145 additions and 2157 deletions

2
integration/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/target/
**/*.rs.bk

4
integration/Cargo.lock generated Normal file
View File

@@ -0,0 +1,4 @@
[[package]]
name = "integration"
version = "0.1.0"

6
integration/Cargo.toml Normal file
View File

@@ -0,0 +1,6 @@
[package]
name = "integration"
version = "0.1.0"
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
[dependencies]

2
integration/README.md Normal file
View File

@@ -0,0 +1,2 @@
# Rojo Integration Runner
This is a WIP test runner designed for Rojo. It will eventually start up the Rojo server and plugin and test functionality end-to-end.

32
integration/src/main.rs Normal file
View File

@@ -0,0 +1,32 @@
use std::{
path::Path,
process::Command,
thread,
time::Duration,
};
fn main() {
let plugin_path = Path::new("../plugin");
let server_path = Path::new("../server");
let tests_path = Path::new("../tests");
let server = Command::new("cargo")
.args(&["run", "--", "serve", "../test-projects/empty"])
.current_dir(server_path)
.spawn();
thread::sleep(Duration::from_millis(1000));
// TODO: Wait for server to start responding on the right port
let test_client = Command::new("lua")
.args(&["runTest.lua", "tests/empty.lua"])
.current_dir(plugin_path)
.spawn();
thread::sleep(Duration::from_millis(300));
// TODO: Collect output from the client for success/failure?
println!("Dying!");
}