From ce1800746bc2da0b8c2e0d4746b6dfcdf74bcbb4 Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Sun, 3 Dec 2023 00:20:54 +0200 Subject: [PATCH] Fix 'require' in benchmarks to work with new relative system (#1120) Old style require is now called with `pcall` to support comparing against Lua. New style require is now a third option. Edit: this will be a temporary solution until the 'paths' support in .luaurc is fixed. --- bench/bench_support.lua | 2 +- bench/gc/test_BinaryTree.lua | 2 +- bench/gc/test_GC_Boehm_Trees.lua | 2 +- bench/gc/test_GC_Tree_Pruning_Eager.lua | 2 +- bench/gc/test_GC_Tree_Pruning_Gen.lua | 2 +- bench/gc/test_GC_Tree_Pruning_Lazy.lua | 2 +- bench/gc/test_GC_hashtable_Keyval.lua | 2 +- bench/gc/test_LB_mandel.lua | 2 +- bench/gc/test_LargeTableCtor_array.lua | 2 +- bench/gc/test_LargeTableCtor_hash.lua | 2 +- bench/gc/test_Pcall_pcall_yield.lua | 2 +- bench/gc/test_SunSpider_3d-raytrace.lua | 2 +- bench/gc/test_TableCreate_nil.lua | 2 +- bench/gc/test_TableCreate_number.lua | 2 +- bench/gc/test_TableCreate_zerofill.lua | 2 +- bench/gc/test_TableMarshal_select.lua | 2 +- bench/gc/test_TableMarshal_table_pack.lua | 2 +- bench/gc/test_TableMarshal_varargs.lua | 2 +- bench/micro_tests/test_AbsSum_abs.lua | 2 +- bench/micro_tests/test_AbsSum_and_or.lua | 2 +- bench/micro_tests/test_AbsSum_math_abs.lua | 2 +- bench/micro_tests/test_Assert.lua | 2 +- bench/micro_tests/test_Factorial.lua | 2 +- bench/micro_tests/test_Failure_pcall_a_bar.lua | 2 +- bench/micro_tests/test_Failure_pcall_game_Foo.lua | 2 +- bench/micro_tests/test_Failure_xpcall_a_bar.lua | 2 +- bench/micro_tests/test_Failure_xpcall_game_Foo.lua | 2 +- bench/micro_tests/test_LargeTableCtor_array.lua | 2 +- bench/micro_tests/test_LargeTableCtor_hash.lua | 2 +- bench/micro_tests/test_LargeTableSum_loop_index.lua | 2 +- bench/micro_tests/test_LargeTableSum_loop_ipairs.lua | 2 +- bench/micro_tests/test_LargeTableSum_loop_iter.lua | 2 +- bench/micro_tests/test_LargeTableSum_loop_pairs.lua | 2 +- bench/micro_tests/test_MethodCalls.lua | 2 +- bench/micro_tests/test_OOP_constructor.lua | 2 +- bench/micro_tests/test_OOP_method_call.lua | 2 +- bench/micro_tests/test_OOP_virtual_constructor.lua | 2 +- bench/micro_tests/test_Pcall_call_return.lua | 2 +- bench/micro_tests/test_Pcall_pcall_return.lua | 2 +- bench/micro_tests/test_Pcall_pcall_yield.lua | 2 +- bench/micro_tests/test_Pcall_xpcall_return.lua | 2 +- bench/micro_tests/test_SqrtSum_exponent.lua | 2 +- bench/micro_tests/test_SqrtSum_math_sqrt.lua | 2 +- bench/micro_tests/test_SqrtSum_sqrt.lua | 2 +- bench/micro_tests/test_SqrtSum_sqrt_getfenv.lua | 2 +- bench/micro_tests/test_SqrtSum_sqrt_roundabout.lua | 2 +- bench/micro_tests/test_StringInterp.lua | 2 +- bench/micro_tests/test_TableCreate_nil.lua | 2 +- bench/micro_tests/test_TableCreate_number.lua | 2 +- bench/micro_tests/test_TableCreate_zerofill.lua | 2 +- bench/micro_tests/test_TableFind_loop_ipairs.lua | 2 +- bench/micro_tests/test_TableFind_table_find.lua | 2 +- bench/micro_tests/test_TableInsertion_index_cached.lua | 2 +- bench/micro_tests/test_TableInsertion_index_len.lua | 2 +- bench/micro_tests/test_TableInsertion_table_insert.lua | 2 +- bench/micro_tests/test_TableInsertion_table_insert_index.lua | 2 +- bench/micro_tests/test_TableIteration.lua | 2 +- bench/micro_tests/test_TableMarshal_select.lua | 2 +- bench/micro_tests/test_TableMarshal_table_pack.lua | 2 +- bench/micro_tests/test_TableMarshal_table_unpack_array.lua | 2 +- bench/micro_tests/test_TableMarshal_table_unpack_range.lua | 2 +- bench/micro_tests/test_TableMarshal_varargs.lua | 2 +- bench/micro_tests/test_TableMove_empty_table.lua | 2 +- bench/micro_tests/test_TableMove_same_table.lua | 2 +- bench/micro_tests/test_TableMove_table_create.lua | 2 +- bench/micro_tests/test_TableRemoval_table_remove.lua | 2 +- bench/micro_tests/test_TableSort.lua | 2 +- bench/micro_tests/test_ToNumberString.lua | 2 +- bench/micro_tests/test_UpvalueCapture.lua | 2 +- bench/micro_tests/test_VariadicSelect.lua | 2 +- bench/micro_tests/test_string_lib.lua | 2 +- bench/micro_tests/test_table_concat.lua | 2 +- bench/tests/base64.lua | 2 +- bench/tests/chess.lua | 2 +- bench/tests/life.lua | 2 +- bench/tests/matrixmult.lua | 2 +- bench/tests/mesh-normal-scalar.lua | 2 +- bench/tests/pcmmix.lua | 2 +- bench/tests/qsort.lua | 2 +- bench/tests/sha256.lua | 2 +- bench/tests/shootout/ack.lua | 2 +- bench/tests/shootout/binary-trees.lua | 2 +- bench/tests/shootout/fannkuch-redux.lua | 2 +- bench/tests/shootout/fixpoint-fact.lua | 2 +- bench/tests/shootout/heapsort.lua | 2 +- bench/tests/shootout/mandel.lua | 2 +- bench/tests/shootout/n-body.lua | 2 +- bench/tests/shootout/qt.lua | 2 +- bench/tests/shootout/queen.lua | 2 +- bench/tests/shootout/scimark.lua | 2 +- bench/tests/shootout/spectral-norm.lua | 2 +- bench/tests/sieve.lua | 2 +- bench/tests/sunspider/3d-cube.lua | 2 +- bench/tests/sunspider/3d-morph.lua | 2 +- bench/tests/sunspider/3d-raytrace.lua | 2 +- bench/tests/sunspider/controlflow-recursive.lua | 2 +- bench/tests/sunspider/crypto-aes.lua | 2 +- bench/tests/sunspider/fannkuch.lua | 2 +- bench/tests/sunspider/math-cordic.lua | 2 +- bench/tests/sunspider/math-partial-sums.lua | 2 +- bench/tests/sunspider/n-body-oop.lua | 2 +- bench/tests/tictactoe.lua | 2 +- bench/tests/trig.lua | 2 +- bench/tests/voxelgen.lua | 2 +- 104 files changed, 104 insertions(+), 104 deletions(-) diff --git a/bench/bench_support.lua b/bench/bench_support.lua index 9e415fc1c..0c225b393 100644 --- a/bench/bench_support.lua +++ b/bench/bench_support.lua @@ -66,7 +66,7 @@ end -- and 'false' otherwise. -- -- Example usage: --- local bench = script and require(script.Parent.bench_support) or require("bench_support") +-- local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") -- function testFunc() -- ... -- end diff --git a/bench/gc/test_BinaryTree.lua b/bench/gc/test_BinaryTree.lua index 2a797382e..622e45404 100644 --- a/bench/gc/test_BinaryTree.lua +++ b/bench/gc/test_BinaryTree.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_GC_Boehm_Trees.lua b/bench/gc/test_GC_Boehm_Trees.lua index 08af27425..5ab52104b 100644 --- a/bench/gc/test_GC_Boehm_Trees.lua +++ b/bench/gc/test_GC_Boehm_Trees.lua @@ -1,5 +1,5 @@ --!nonstrict -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") local stretchTreeDepth = 18 -- about 16Mb local longLivedTreeDepth = 16 -- about 4Mb diff --git a/bench/gc/test_GC_Tree_Pruning_Eager.lua b/bench/gc/test_GC_Tree_Pruning_Eager.lua index 2111d9ffa..b00b18c93 100644 --- a/bench/gc/test_GC_Tree_Pruning_Eager.lua +++ b/bench/gc/test_GC_Tree_Pruning_Eager.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() local count = 1 diff --git a/bench/gc/test_GC_Tree_Pruning_Gen.lua b/bench/gc/test_GC_Tree_Pruning_Gen.lua index f88bd7f47..32f5a17a1 100644 --- a/bench/gc/test_GC_Tree_Pruning_Gen.lua +++ b/bench/gc/test_GC_Tree_Pruning_Gen.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() local count = 1 diff --git a/bench/gc/test_GC_Tree_Pruning_Lazy.lua b/bench/gc/test_GC_Tree_Pruning_Lazy.lua index 3ea6bbef1..8aedc0eaa 100644 --- a/bench/gc/test_GC_Tree_Pruning_Lazy.lua +++ b/bench/gc/test_GC_Tree_Pruning_Lazy.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() local count = 1 diff --git a/bench/gc/test_GC_hashtable_Keyval.lua b/bench/gc/test_GC_hashtable_Keyval.lua index fcb248260..f2dd1abae 100644 --- a/bench/gc/test_GC_hashtable_Keyval.lua +++ b/bench/gc/test_GC_hashtable_Keyval.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() local t = {} diff --git a/bench/gc/test_LB_mandel.lua b/bench/gc/test_LB_mandel.lua index fe5b4eb2f..91ea27435 100644 --- a/bench/gc/test_LB_mandel.lua +++ b/bench/gc/test_LB_mandel.lua @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_LargeTableCtor_array.lua b/bench/gc/test_LargeTableCtor_array.lua index 535877f7c..65f03382b 100644 --- a/bench/gc/test_LargeTableCtor_array.lua +++ b/bench/gc/test_LargeTableCtor_array.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_LargeTableCtor_hash.lua b/bench/gc/test_LargeTableCtor_hash.lua index 6faf766ae..c3b2b62b0 100644 --- a/bench/gc/test_LargeTableCtor_hash.lua +++ b/bench/gc/test_LargeTableCtor_hash.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_Pcall_pcall_yield.lua b/bench/gc/test_Pcall_pcall_yield.lua index ac46c79e4..a4945b018 100644 --- a/bench/gc/test_Pcall_pcall_yield.lua +++ b/bench/gc/test_Pcall_pcall_yield.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_SunSpider_3d-raytrace.lua b/bench/gc/test_SunSpider_3d-raytrace.lua index 60e4f61e4..1226bbd09 100644 --- a/bench/gc/test_SunSpider_3d-raytrace.lua +++ b/bench/gc/test_SunSpider_3d-raytrace.lua @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_TableCreate_nil.lua b/bench/gc/test_TableCreate_nil.lua index 1eff20e9f..f1d1ce82f 100644 --- a/bench/gc/test_TableCreate_nil.lua +++ b/bench/gc/test_TableCreate_nil.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_TableCreate_number.lua b/bench/gc/test_TableCreate_number.lua index 620b56241..9a092152e 100644 --- a/bench/gc/test_TableCreate_number.lua +++ b/bench/gc/test_TableCreate_number.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_TableCreate_zerofill.lua b/bench/gc/test_TableCreate_zerofill.lua index 08c6c91ba..414649e39 100644 --- a/bench/gc/test_TableCreate_zerofill.lua +++ b/bench/gc/test_TableCreate_zerofill.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_TableMarshal_select.lua b/bench/gc/test_TableMarshal_select.lua index 110d91259..9b8824a05 100644 --- a/bench/gc/test_TableMarshal_select.lua +++ b/bench/gc/test_TableMarshal_select.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_TableMarshal_table_pack.lua b/bench/gc/test_TableMarshal_table_pack.lua index 45810a3f5..64575a604 100644 --- a/bench/gc/test_TableMarshal_table_pack.lua +++ b/bench/gc/test_TableMarshal_table_pack.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/gc/test_TableMarshal_varargs.lua b/bench/gc/test_TableMarshal_varargs.lua index 19ef81fc3..9f156ca85 100644 --- a/bench/gc/test_TableMarshal_varargs.lua +++ b/bench/gc/test_TableMarshal_varargs.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_AbsSum_abs.lua b/bench/micro_tests/test_AbsSum_abs.lua index 33b6d7a36..bb28f5eed 100644 --- a/bench/micro_tests/test_AbsSum_abs.lua +++ b/bench/micro_tests/test_AbsSum_abs.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_AbsSum_and_or.lua b/bench/micro_tests/test_AbsSum_and_or.lua index a613c466c..70eb2f3b0 100644 --- a/bench/micro_tests/test_AbsSum_and_or.lua +++ b/bench/micro_tests/test_AbsSum_and_or.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_AbsSum_math_abs.lua b/bench/micro_tests/test_AbsSum_math_abs.lua index 2f529c6ac..4664a97f1 100644 --- a/bench/micro_tests/test_AbsSum_math_abs.lua +++ b/bench/micro_tests/test_AbsSum_math_abs.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Assert.lua b/bench/micro_tests/test_Assert.lua index fcc99b49d..bd3cf37a9 100644 --- a/bench/micro_tests/test_Assert.lua +++ b/bench/micro_tests/test_Assert.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Factorial.lua b/bench/micro_tests/test_Factorial.lua index 1742c4cfb..fa5618976 100644 --- a/bench/micro_tests/test_Factorial.lua +++ b/bench/micro_tests/test_Factorial.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Failure_pcall_a_bar.lua b/bench/micro_tests/test_Failure_pcall_a_bar.lua index 16dd1bf78..27c43e618 100644 --- a/bench/micro_tests/test_Failure_pcall_a_bar.lua +++ b/bench/micro_tests/test_Failure_pcall_a_bar.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Failure_pcall_game_Foo.lua b/bench/micro_tests/test_Failure_pcall_game_Foo.lua index 90fb3fc85..ddc65a222 100644 --- a/bench/micro_tests/test_Failure_pcall_game_Foo.lua +++ b/bench/micro_tests/test_Failure_pcall_game_Foo.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Failure_xpcall_a_bar.lua b/bench/micro_tests/test_Failure_xpcall_a_bar.lua index 50bff4ba4..6e8549988 100644 --- a/bench/micro_tests/test_Failure_xpcall_a_bar.lua +++ b/bench/micro_tests/test_Failure_xpcall_a_bar.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Failure_xpcall_game_Foo.lua b/bench/micro_tests/test_Failure_xpcall_game_Foo.lua index 5e91e38f4..1b59dd8bb 100644 --- a/bench/micro_tests/test_Failure_xpcall_game_Foo.lua +++ b/bench/micro_tests/test_Failure_xpcall_game_Foo.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_LargeTableCtor_array.lua b/bench/micro_tests/test_LargeTableCtor_array.lua index 535877f7c..65f03382b 100644 --- a/bench/micro_tests/test_LargeTableCtor_array.lua +++ b/bench/micro_tests/test_LargeTableCtor_array.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_LargeTableCtor_hash.lua b/bench/micro_tests/test_LargeTableCtor_hash.lua index 6faf766ae..c3b2b62b0 100644 --- a/bench/micro_tests/test_LargeTableCtor_hash.lua +++ b/bench/micro_tests/test_LargeTableCtor_hash.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_LargeTableSum_loop_index.lua b/bench/micro_tests/test_LargeTableSum_loop_index.lua index 2b65073c0..1d1b00fae 100644 --- a/bench/micro_tests/test_LargeTableSum_loop_index.lua +++ b/bench/micro_tests/test_LargeTableSum_loop_index.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_LargeTableSum_loop_ipairs.lua b/bench/micro_tests/test_LargeTableSum_loop_ipairs.lua index b0c1085fb..d4b401e24 100644 --- a/bench/micro_tests/test_LargeTableSum_loop_ipairs.lua +++ b/bench/micro_tests/test_LargeTableSum_loop_ipairs.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_LargeTableSum_loop_iter.lua b/bench/micro_tests/test_LargeTableSum_loop_iter.lua index 057420f6d..edc8c2030 100644 --- a/bench/micro_tests/test_LargeTableSum_loop_iter.lua +++ b/bench/micro_tests/test_LargeTableSum_loop_iter.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_LargeTableSum_loop_pairs.lua b/bench/micro_tests/test_LargeTableSum_loop_pairs.lua index 55b848673..d71bca928 100644 --- a/bench/micro_tests/test_LargeTableSum_loop_pairs.lua +++ b/bench/micro_tests/test_LargeTableSum_loop_pairs.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_MethodCalls.lua b/bench/micro_tests/test_MethodCalls.lua index fa56005fd..72376d202 100644 --- a/bench/micro_tests/test_MethodCalls.lua +++ b/bench/micro_tests/test_MethodCalls.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_OOP_constructor.lua b/bench/micro_tests/test_OOP_constructor.lua index 6e3633ce0..94b88ba01 100644 --- a/bench/micro_tests/test_OOP_constructor.lua +++ b/bench/micro_tests/test_OOP_constructor.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_OOP_method_call.lua b/bench/micro_tests/test_OOP_method_call.lua index c2c6c4ede..994b6fe18 100644 --- a/bench/micro_tests/test_OOP_method_call.lua +++ b/bench/micro_tests/test_OOP_method_call.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_OOP_virtual_constructor.lua b/bench/micro_tests/test_OOP_virtual_constructor.lua index 48b1e5594..7eee6d1c7 100644 --- a/bench/micro_tests/test_OOP_virtual_constructor.lua +++ b/bench/micro_tests/test_OOP_virtual_constructor.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Pcall_call_return.lua b/bench/micro_tests/test_Pcall_call_return.lua index 9d07708cb..f526c44d2 100644 --- a/bench/micro_tests/test_Pcall_call_return.lua +++ b/bench/micro_tests/test_Pcall_call_return.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Pcall_pcall_return.lua b/bench/micro_tests/test_Pcall_pcall_return.lua index a6ff3599e..38ba89f17 100644 --- a/bench/micro_tests/test_Pcall_pcall_return.lua +++ b/bench/micro_tests/test_Pcall_pcall_return.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Pcall_pcall_yield.lua b/bench/micro_tests/test_Pcall_pcall_yield.lua index ac46c79e4..a4945b018 100644 --- a/bench/micro_tests/test_Pcall_pcall_yield.lua +++ b/bench/micro_tests/test_Pcall_pcall_yield.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_Pcall_xpcall_return.lua b/bench/micro_tests/test_Pcall_xpcall_return.lua index a64eddfd4..0cec8a351 100644 --- a/bench/micro_tests/test_Pcall_xpcall_return.lua +++ b/bench/micro_tests/test_Pcall_xpcall_return.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_SqrtSum_exponent.lua b/bench/micro_tests/test_SqrtSum_exponent.lua index eaddbfdd9..8d845bce9 100644 --- a/bench/micro_tests/test_SqrtSum_exponent.lua +++ b/bench/micro_tests/test_SqrtSum_exponent.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_SqrtSum_math_sqrt.lua b/bench/micro_tests/test_SqrtSum_math_sqrt.lua index 44b61cc9a..2fe107ff8 100644 --- a/bench/micro_tests/test_SqrtSum_math_sqrt.lua +++ b/bench/micro_tests/test_SqrtSum_math_sqrt.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_SqrtSum_sqrt.lua b/bench/micro_tests/test_SqrtSum_sqrt.lua index 34d8b3852..f18a4f755 100644 --- a/bench/micro_tests/test_SqrtSum_sqrt.lua +++ b/bench/micro_tests/test_SqrtSum_sqrt.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_SqrtSum_sqrt_getfenv.lua b/bench/micro_tests/test_SqrtSum_sqrt_getfenv.lua index 242edb856..051248d8e 100644 --- a/bench/micro_tests/test_SqrtSum_sqrt_getfenv.lua +++ b/bench/micro_tests/test_SqrtSum_sqrt_getfenv.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_SqrtSum_sqrt_roundabout.lua b/bench/micro_tests/test_SqrtSum_sqrt_roundabout.lua index fa8bfd0a1..d399f4fa3 100644 --- a/bench/micro_tests/test_SqrtSum_sqrt_roundabout.lua +++ b/bench/micro_tests/test_SqrtSum_sqrt_roundabout.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_StringInterp.lua b/bench/micro_tests/test_StringInterp.lua index 1e7ccbc7b..aef79ff50 100644 --- a/bench/micro_tests/test_StringInterp.lua +++ b/bench/micro_tests/test_StringInterp.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") bench.runCode(function() for j=1,1e6 do diff --git a/bench/micro_tests/test_TableCreate_nil.lua b/bench/micro_tests/test_TableCreate_nil.lua index 1eff20e9f..f1d1ce82f 100644 --- a/bench/micro_tests/test_TableCreate_nil.lua +++ b/bench/micro_tests/test_TableCreate_nil.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableCreate_number.lua b/bench/micro_tests/test_TableCreate_number.lua index 620b56241..9a092152e 100644 --- a/bench/micro_tests/test_TableCreate_number.lua +++ b/bench/micro_tests/test_TableCreate_number.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableCreate_zerofill.lua b/bench/micro_tests/test_TableCreate_zerofill.lua index 08c6c91ba..414649e39 100644 --- a/bench/micro_tests/test_TableCreate_zerofill.lua +++ b/bench/micro_tests/test_TableCreate_zerofill.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableFind_loop_ipairs.lua b/bench/micro_tests/test_TableFind_loop_ipairs.lua index f363013d9..926ec4cbc 100644 --- a/bench/micro_tests/test_TableFind_loop_ipairs.lua +++ b/bench/micro_tests/test_TableFind_loop_ipairs.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableFind_table_find.lua b/bench/micro_tests/test_TableFind_table_find.lua index a7619fce2..01f9af9a7 100644 --- a/bench/micro_tests/test_TableFind_table_find.lua +++ b/bench/micro_tests/test_TableFind_table_find.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableInsertion_index_cached.lua b/bench/micro_tests/test_TableInsertion_index_cached.lua index 7f75b0226..ff0ff19c7 100644 --- a/bench/micro_tests/test_TableInsertion_index_cached.lua +++ b/bench/micro_tests/test_TableInsertion_index_cached.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableInsertion_index_len.lua b/bench/micro_tests/test_TableInsertion_index_len.lua index b9f71e0e9..c986dd1e9 100644 --- a/bench/micro_tests/test_TableInsertion_index_len.lua +++ b/bench/micro_tests/test_TableInsertion_index_len.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableInsertion_table_insert.lua b/bench/micro_tests/test_TableInsertion_table_insert.lua index 9efccd4da..c947c5be0 100644 --- a/bench/micro_tests/test_TableInsertion_table_insert.lua +++ b/bench/micro_tests/test_TableInsertion_table_insert.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableInsertion_table_insert_index.lua b/bench/micro_tests/test_TableInsertion_table_insert_index.lua index af2292baa..3924a1e7b 100644 --- a/bench/micro_tests/test_TableInsertion_table_insert_index.lua +++ b/bench/micro_tests/test_TableInsertion_table_insert_index.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableIteration.lua b/bench/micro_tests/test_TableIteration.lua index 47a94a3b1..ef7339b4b 100644 --- a/bench/micro_tests/test_TableIteration.lua +++ b/bench/micro_tests/test_TableIteration.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableMarshal_select.lua b/bench/micro_tests/test_TableMarshal_select.lua index 110d91259..9b8824a05 100644 --- a/bench/micro_tests/test_TableMarshal_select.lua +++ b/bench/micro_tests/test_TableMarshal_select.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableMarshal_table_pack.lua b/bench/micro_tests/test_TableMarshal_table_pack.lua index 45810a3f5..64575a604 100644 --- a/bench/micro_tests/test_TableMarshal_table_pack.lua +++ b/bench/micro_tests/test_TableMarshal_table_pack.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableMarshal_table_unpack_array.lua b/bench/micro_tests/test_TableMarshal_table_unpack_array.lua index 67bc1efae..fa3b949e1 100644 --- a/bench/micro_tests/test_TableMarshal_table_unpack_array.lua +++ b/bench/micro_tests/test_TableMarshal_table_unpack_array.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableMarshal_table_unpack_range.lua b/bench/micro_tests/test_TableMarshal_table_unpack_range.lua index a678d8bfa..bc9a8377f 100644 --- a/bench/micro_tests/test_TableMarshal_table_unpack_range.lua +++ b/bench/micro_tests/test_TableMarshal_table_unpack_range.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableMarshal_varargs.lua b/bench/micro_tests/test_TableMarshal_varargs.lua index 19ef81fc3..9f156ca85 100644 --- a/bench/micro_tests/test_TableMarshal_varargs.lua +++ b/bench/micro_tests/test_TableMarshal_varargs.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableMove_empty_table.lua b/bench/micro_tests/test_TableMove_empty_table.lua index 75ce27293..483690b93 100644 --- a/bench/micro_tests/test_TableMove_empty_table.lua +++ b/bench/micro_tests/test_TableMove_empty_table.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() local t = table.create(250001, 0) diff --git a/bench/micro_tests/test_TableMove_same_table.lua b/bench/micro_tests/test_TableMove_same_table.lua index 81576573e..ef58841d9 100644 --- a/bench/micro_tests/test_TableMove_same_table.lua +++ b/bench/micro_tests/test_TableMove_same_table.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() local t = table.create(5000001, 0) diff --git a/bench/micro_tests/test_TableMove_table_create.lua b/bench/micro_tests/test_TableMove_table_create.lua index 19dfd1864..1ad9baa8f 100644 --- a/bench/micro_tests/test_TableMove_table_create.lua +++ b/bench/micro_tests/test_TableMove_table_create.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() local t = table.create(250001, 0) diff --git a/bench/micro_tests/test_TableRemoval_table_remove.lua b/bench/micro_tests/test_TableRemoval_table_remove.lua index 25acd541c..9d5e7d270 100644 --- a/bench/micro_tests/test_TableRemoval_table_remove.lua +++ b/bench/micro_tests/test_TableRemoval_table_remove.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_TableSort.lua b/bench/micro_tests/test_TableSort.lua index 80031d1cf..21518a83f 100644 --- a/bench/micro_tests/test_TableSort.lua +++ b/bench/micro_tests/test_TableSort.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") local arr_months = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"} diff --git a/bench/micro_tests/test_ToNumberString.lua b/bench/micro_tests/test_ToNumberString.lua index 611047831..c5f426718 100644 --- a/bench/micro_tests/test_ToNumberString.lua +++ b/bench/micro_tests/test_ToNumberString.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") bench.runCode(function() for j=1,1e6 do diff --git a/bench/micro_tests/test_UpvalueCapture.lua b/bench/micro_tests/test_UpvalueCapture.lua index 96e8f576f..c6264cdf0 100644 --- a/bench/micro_tests/test_UpvalueCapture.lua +++ b/bench/micro_tests/test_UpvalueCapture.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_VariadicSelect.lua b/bench/micro_tests/test_VariadicSelect.lua index 668956f49..2a544282b 100644 --- a/bench/micro_tests/test_VariadicSelect.lua +++ b/bench/micro_tests/test_VariadicSelect.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/micro_tests/test_string_lib.lua b/bench/micro_tests/test_string_lib.lua index 3994c7787..5e25e940a 100644 --- a/bench/micro_tests/test_string_lib.lua +++ b/bench/micro_tests/test_string_lib.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") bench.runCode(function() local src = string.rep("abcdefghijklmnopqrstuvwxyz", 100) diff --git a/bench/micro_tests/test_table_concat.lua b/bench/micro_tests/test_table_concat.lua index 430ad0ab1..6524371b3 100644 --- a/bench/micro_tests/test_table_concat.lua +++ b/bench/micro_tests/test_table_concat.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") bench.runCode(function() for outer=1,28,3 do diff --git a/bench/tests/base64.lua b/bench/tests/base64.lua index 3755c54f5..cf9320904 100644 --- a/bench/tests/base64.lua +++ b/bench/tests/base64.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/chess.lua b/bench/tests/chess.lua index f6ae2cc6b..70f1bdb3d 100644 --- a/bench/tests/chess.lua +++ b/bench/tests/chess.lua @@ -1,5 +1,5 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") local RANKS = "12345678" local FILES = "abcdefgh" diff --git a/bench/tests/life.lua b/bench/tests/life.lua index 51586ad7b..b596a67d3 100644 --- a/bench/tests/life.lua +++ b/bench/tests/life.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/matrixmult.lua b/bench/tests/matrixmult.lua index d8dd4cc3a..116276e73 100644 --- a/bench/tests/matrixmult.lua +++ b/bench/tests/matrixmult.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") local function mmul(matrix1, matrix2) local shapeRows = #matrix1 diff --git a/bench/tests/mesh-normal-scalar.lua b/bench/tests/mesh-normal-scalar.lua index 368fa2fdb..3d6488123 100644 --- a/bench/tests/mesh-normal-scalar.lua +++ b/bench/tests/mesh-normal-scalar.lua @@ -1,5 +1,5 @@ --!strict -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/pcmmix.lua b/bench/tests/pcmmix.lua index a1760f677..1c94a5fd0 100644 --- a/bench/tests/pcmmix.lua +++ b/bench/tests/pcmmix.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") local samples = 100_000 diff --git a/bench/tests/qsort.lua b/bench/tests/qsort.lua index 99037176d..bcc37d38d 100644 --- a/bench/tests/qsort.lua +++ b/bench/tests/qsort.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/sha256.lua b/bench/tests/sha256.lua index a01e801ed..94094fe1f 100644 --- a/bench/tests/sha256.lua +++ b/bench/tests/sha256.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/shootout/ack.lua b/bench/tests/shootout/ack.lua index 540e8594b..c17f635be 100644 --- a/bench/tests/shootout/ack.lua +++ b/bench/tests/shootout/ack.lua @@ -23,7 +23,7 @@ SOFTWARE. ]] -- http://www.bagley.org/~doug/shootout/ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/binary-trees.lua b/bench/tests/shootout/binary-trees.lua index a3c5ae64a..8bebbf89c 100644 --- a/bench/tests/shootout/binary-trees.lua +++ b/bench/tests/shootout/binary-trees.lua @@ -25,7 +25,7 @@ SOFTWARE. -- http://benchmarksgame.alioth.debian.org/ -- contributed by Mike Pall -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/fannkuch-redux.lua b/bench/tests/shootout/fannkuch-redux.lua index e23f3a263..7a2489404 100644 --- a/bench/tests/shootout/fannkuch-redux.lua +++ b/bench/tests/shootout/fannkuch-redux.lua @@ -25,7 +25,7 @@ SOFTWARE. -- http://benchmarksgame.alioth.debian.org/ -- contributed by Mike Pall -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/fixpoint-fact.lua b/bench/tests/shootout/fixpoint-fact.lua index 8e60e9203..458560fe0 100644 --- a/bench/tests/shootout/fixpoint-fact.lua +++ b/bench/tests/shootout/fixpoint-fact.lua @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/heapsort.lua b/bench/tests/shootout/heapsort.lua index fe85859b4..853206df8 100644 --- a/bench/tests/shootout/heapsort.lua +++ b/bench/tests/shootout/heapsort.lua @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/mandel.lua b/bench/tests/shootout/mandel.lua index fe5b4eb2f..181b5ff5b 100644 --- a/bench/tests/shootout/mandel.lua +++ b/bench/tests/shootout/mandel.lua @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/n-body.lua b/bench/tests/shootout/n-body.lua index 40341587f..279c682ff 100644 --- a/bench/tests/shootout/n-body.lua +++ b/bench/tests/shootout/n-body.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/qt.lua b/bench/tests/shootout/qt.lua index 79cbe38ba..758e3200b 100644 --- a/bench/tests/shootout/qt.lua +++ b/bench/tests/shootout/qt.lua @@ -23,7 +23,7 @@ SOFTWARE. ]] -- Julia sets via interval cell-mapping (quadtree version) -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/queen.lua b/bench/tests/shootout/queen.lua index 185dabd83..bcbb5fc89 100644 --- a/bench/tests/shootout/queen.lua +++ b/bench/tests/shootout/queen.lua @@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/scimark.lua b/bench/tests/shootout/scimark.lua index ad0557b1d..015d8cdbb 100644 --- a/bench/tests/shootout/scimark.lua +++ b/bench/tests/shootout/scimark.lua @@ -33,7 +33,7 @@ -- Modification to be compatible with Lua 5.3 ------------------------------------------------------------------------------ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/shootout/spectral-norm.lua b/bench/tests/shootout/spectral-norm.lua index 6d217aa63..3f15a93f6 100644 --- a/bench/tests/shootout/spectral-norm.lua +++ b/bench/tests/shootout/spectral-norm.lua @@ -25,7 +25,7 @@ SOFTWARE. -- http://benchmarksgame.alioth.debian.org/ -- contributed by Mike Pall -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sieve.lua b/bench/tests/sieve.lua index 718ec4889..6a6a45f09 100644 --- a/bench/tests/sieve.lua +++ b/bench/tests/sieve.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/sunspider/3d-cube.lua b/bench/tests/sunspider/3d-cube.lua index 77fa08540..d18d0f960 100644 --- a/bench/tests/sunspider/3d-cube.lua +++ b/bench/tests/sunspider/3d-cube.lua @@ -2,7 +2,7 @@ -- http://www.speich.net/computer/moztesting/3d.htm -- Created by Simon Speich -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sunspider/3d-morph.lua b/bench/tests/sunspider/3d-morph.lua index 79e914191..7a0e1a9a8 100644 --- a/bench/tests/sunspider/3d-morph.lua +++ b/bench/tests/sunspider/3d-morph.lua @@ -23,7 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sunspider/3d-raytrace.lua b/bench/tests/sunspider/3d-raytrace.lua index 3d5276c70..98a63540e 100644 --- a/bench/tests/sunspider/3d-raytrace.lua +++ b/bench/tests/sunspider/3d-raytrace.lua @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sunspider/controlflow-recursive.lua b/bench/tests/sunspider/controlflow-recursive.lua index a2591b2f0..9150fec44 100644 --- a/bench/tests/sunspider/controlflow-recursive.lua +++ b/bench/tests/sunspider/controlflow-recursive.lua @@ -3,7 +3,7 @@ http://shootout.alioth.debian.org/ contributed by Isaac Gouy ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sunspider/crypto-aes.lua b/bench/tests/sunspider/crypto-aes.lua index e3f540875..00fd16289 100644 --- a/bench/tests/sunspider/crypto-aes.lua +++ b/bench/tests/sunspider/crypto-aes.lua @@ -9,7 +9,7 @@ * returns byte-array encrypted value (16 bytes) */]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") -- Sbox is pre-computed multiplicative inverse in GF(2^8) used in SubBytes and KeyExpansion [ยง5.1.1] local Sbox = { 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76, diff --git a/bench/tests/sunspider/fannkuch.lua b/bench/tests/sunspider/fannkuch.lua index ad77e83b0..76d21343f 100644 --- a/bench/tests/sunspider/fannkuch.lua +++ b/bench/tests/sunspider/fannkuch.lua @@ -3,7 +3,7 @@ http://shootout.alioth.debian.org/ contributed by Isaac Gouy ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sunspider/math-cordic.lua b/bench/tests/sunspider/math-cordic.lua index cdb10fa22..6da02761b 100644 --- a/bench/tests/sunspider/math-cordic.lua +++ b/bench/tests/sunspider/math-cordic.lua @@ -23,7 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] - local bench = script and require(script.Parent.bench_support) or require("bench_support") + local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sunspider/math-partial-sums.lua b/bench/tests/sunspider/math-partial-sums.lua index 9977ceff3..e94ec866f 100644 --- a/bench/tests/sunspider/math-partial-sums.lua +++ b/bench/tests/sunspider/math-partial-sums.lua @@ -3,7 +3,7 @@ http://shootout.alioth.debian.org/ contributed by Isaac Gouy ]] -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") function test() diff --git a/bench/tests/sunspider/n-body-oop.lua b/bench/tests/sunspider/n-body-oop.lua index adcc15a7d..81c0ad13c 100644 --- a/bench/tests/sunspider/n-body-oop.lua +++ b/bench/tests/sunspider/n-body-oop.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../../bench_support") local PI = 3.141592653589793 local SOLAR_MASS = 4 * PI * PI diff --git a/bench/tests/tictactoe.lua b/bench/tests/tictactoe.lua index 91d38f959..354b7b461 100644 --- a/bench/tests/tictactoe.lua +++ b/bench/tests/tictactoe.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/trig.lua b/bench/tests/trig.lua index 702e699ed..f85a7fea8 100644 --- a/bench/tests/trig.lua +++ b/bench/tests/trig.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") function test() diff --git a/bench/tests/voxelgen.lua b/bench/tests/voxelgen.lua index ae2cd861a..725a0d1b8 100644 --- a/bench/tests/voxelgen.lua +++ b/bench/tests/voxelgen.lua @@ -1,4 +1,4 @@ -local bench = script and require(script.Parent.bench_support) or require("bench_support") +local bench = script and require(script.Parent.bench_support) or pcall(require, "bench_support") or require("../bench_support") -- Based on voxel terrain generator by Stickmasterluke