-
Notifications
You must be signed in to change notification settings - Fork 57
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good! I had a couple questions here and there but the strategy seems sound to me. Might also want some sort of clear indication of what tools need to be installed to use this. Depending on target and your own project configuration, you might need some combination of lua, roblox-cli, and rojo.
RbxValue::BinaryString { | ||
value: b"TestEZTestRoot".to_vec(), | ||
}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this tagging each child of the src
folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This DOM code is pretty awkward. When models are deserialized from rbx_xml, a DataModel
instance is constructed to hold all of the top-level instances from a model. This is a concession to the fact that models can have multiple top-level instances, but I didn't want the function to return multiple disjoint RbxTree
instances.
This code ends up copying only one directory most of the time, usually src
.
// If we're trying to run at core script security, disable | ||
// the test runner script. It'll be loaded as a core script, | ||
// and not disabling it will cause this code to also run at | ||
// normal security. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this normal, or is it a bug in roblox-cli? Curious if the plan is to come back and change this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. This was the caveat that Anton gave me after he implemented the feature, but I think it would make sense to have roblox-cli do that for us.
//! Some parts of this code are used in the tool's build script mostly, while | ||
//! other parts are used in the tool itself. | ||
|
||
#![allow(unused)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that you need when you only use something in a build.rs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should document this file a little better!
I have #![allow(unused)]
here since half the file is used only in build.rs
and half of it is only used at runtime, but the structs are used in both cases. This is something that should be a crate, but I'm not sure it's polished enough yet.
I tried to dump in a normal GitHub Actions Workflow before realizing that the build depends on Rojo. We could use something like osyrisrblx/setup-rojo, but it only supports Linux right now. Maybe a little more forward-thinking solution would be to adopt Foreman 😄 |
Multiple days later, and I've worked through the build issues on the machine and am successfully using Foreman to pull all of the build dependencies. |
- Supports roblox-cli and Lemur targets - Automatically detects Rotriever and Git submodules dependencies
* Initial implementation of testez-cli - Supports roblox-cli and Lemur targets - Automatically detects Rotriever and Git submodules dependencies * Back out bad merge? * Switch to Rojo stable * Update GitHub workflows and remove Travis config
This PR introduces a Rust tool into the TestEZ source tree named
testez-cli
. It embeds a copy of TestEZ inside itself and exposes an interface for running tests against projects.The TestEZ CLI is intended as a replacement for the various scripts scattered all over the repositories we maintain. It's also supposed to be a parallel to the test runners that other frameworks like Busted and Jest offer.
This tool was previously known as "Testch" internally. We realized that this was a terrible name and also that it made more sense to integrate directly into the TestEZ codebase. This tool also aims to occupy a similar space to some other internal-only tools.
We chose Rust for this tool because Lua is not very suitable for writing a robust command line tool with, and requiring a scripting runtime makes deployingn and consuming tools difficult. Also, my team really likes Rust.
This CLI is going to be relatively opinionated about project structure. It assumes:
default.project.json
Rojo project file that builds your library or game.src
(required for Lemur)modules
roblox-cli
must be on yourPATH
and you must have a production Roblox Studio installation.We plan in the future to expose configuration hooks for customizing the expected project layout for unique cases. We chose these requirements because they make this tool significantly simpler, already line up with conventions we use for open source projects at Roblox, and may help influence the ecosystem positively by pushing the community to standardize on project layout.
TODO
Roblox Studio backend?run-in-roblox backend?modules
folder)