Skip to content

Commit 4f35014

Browse files
committed
refactor: Adding field active to entries.json
1 parent bd1b318 commit 4f35014

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

entries/entries.json.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"output-hash": "0000000000000000000000000000000000000000000000000000000000000000",
1111
"entries": [
1212
{
13+
"active": true,
1314
"name": "Official Baseline",
1415
"notes": "Beeing the last of all",
1516
"compiler": "fpc",
@@ -21,6 +22,7 @@
2122
"run-params": "-i [[input]]"
2223
},
2324
{
25+
"active": true,
2426
"name": "Gustavo Carreno",
2527
"notes": "Using 30 threads",
2628
"compiler": "fpc",

utilities/script_builder/Common/scriptbuilder.common.pas

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ procedure TBuilder.BuildCompileScriptBash;
150150
//for entry in FConfig.Entries do
151151
begin
152152
Write(GenerateProgressBar(index+1, FConfig.Entries.Count, 50), lineBreak);
153+
if not FConfig.Entries[index].Active then continue;
153154
if FConfig.Entries[index].Compiler <> cCompilerFPC then continue;
154155
//if FConfig.Entries[index].EntryBinary = cBaselineBinary then continue;
155156
line:= line + 'echo "===== '+ FConfig.Entries[index].Name +' ======"' + LineEnding;
@@ -215,6 +216,7 @@ procedure TBuilder.BuildTestScriptBash;
215216
for index:= 0 to Pred(FConfig.Entries.Count) do
216217
begin
217218
Write(GenerateProgressBar(index+1, FConfig.Entries.Count, 50), lineBreak);
219+
if not FConfig.Entries[index].Active then continue;
218220
//if FConfig.Entries[index].EntryBinary = cBaselineBinary then continue;
219221
line:= line + 'echo "===== '+ FConfig.Entries[index].Name +' ======"' + LineEnding;
220222
tmpStr:= Format('%s%s %s', [
@@ -272,6 +274,7 @@ procedure TBuilder.BuildRunScriptBash;
272274
for index:= 0 to Pred(FConfig.Entries.Count) do
273275
begin
274276
Write(GenerateProgressBar(index+1, FConfig.Entries.Count, 50), lineBreak);
277+
if not FConfig.Entries[index].Active then continue;
275278
if FConfig.Entries[index].EntryBinary = cBaselineBinary then continue;
276279
line:= line + 'echo "===== '+ FConfig.Entries[index].Name +' ======"' + LineEnding;
277280
// Run for SSD

utilities/script_builder/Common/scriptbuilder.data.entries.pas

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ interface
3333
{ TEntry }
3434
TEntry = class(TObject)
3535
private
36+
FActive: Boolean;
3637
FName: String;
3738
FNotes: String;
3839
FCompiler: String;
@@ -54,6 +55,9 @@ TEntry = class(TObject)
5455

5556
destructor Destroy; override;
5657

58+
property Active: Boolean
59+
read FActive
60+
write FActive;
5761
property Name: String
5862
read FName
5963
write FName;
@@ -134,6 +138,7 @@ TEntriesEnumerator = class(TObject)
134138
implementation
135139

136140
const
141+
cJSONActive = 'active';
137142
cJSONName = 'name';
138143
cJSONNotes = 'notes';
139144
cJSONCompiler = 'compiler';
@@ -155,6 +160,7 @@ implementation
155160

156161
constructor TEntry.Create;
157162
begin
163+
FActive:= false;
158164
FName:= '';
159165
FNotes:= '';
160166
FCompiler:= '';
@@ -188,6 +194,7 @@ procedure TEntry.setFromJSONData(const AJSONData: TJSONData);
188194

189195
procedure TEntry.setFromJSONObject(const AJSONObject: TJSONObject);
190196
begin
197+
FActive:= AJSONObject.Get(cJSONActive, FActive);
191198
FName:= AJSONObject.Get(cJSONName, FName);
192199
FNotes:= AJSONObject.Get(cJSONNotes, FNotes);
193200
FCompiler:= AJSONObject.Get(cJSONCompiler, FCompiler);

0 commit comments

Comments
 (0)