ProjectGuid
Added Climatec to Test.cs GetJobIdDirectory Remove and mesfs
This commit is contained in:
parent
09d2d904c6
commit
6f48f4890e
24
Adaptation/.vscode/settings.json
vendored
24
Adaptation/.vscode/settings.json
vendored
@ -26,25 +26,25 @@
|
||||
],
|
||||
"coverage-gutters.coverageBaseDir": "../../../../MET08AWCT/05_TestResults/TestResults/**",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#5d8f9e",
|
||||
"activityBar.activeBackground": "#4547ab",
|
||||
"activityBar.activeBorder": "#dacec5",
|
||||
"activityBar.background": "#5d8f9e",
|
||||
"activityBar.foreground": "#15202b",
|
||||
"activityBar.inactiveForeground": "#15202b99",
|
||||
"activityBarBadge.background": "#78476d",
|
||||
"activityBar.background": "#4547ab",
|
||||
"activityBar.foreground": "#e7e7e7",
|
||||
"activityBar.inactiveForeground": "#e7e7e799",
|
||||
"activityBarBadge.background": "#2d1213",
|
||||
"activityBarBadge.foreground": "#e7e7e7",
|
||||
"sash.hoverBorder": "#5d8f9e",
|
||||
"statusBar.background": "#4a727e",
|
||||
"sash.hoverBorder": "#4547ab",
|
||||
"statusBar.background": "#363887",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"statusBarItem.hoverBackground": "#5d8f9e",
|
||||
"statusBarItem.remoteBackground": "#4a727e",
|
||||
"statusBarItem.hoverBackground": "#4547ab",
|
||||
"statusBarItem.remoteBackground": "#363887",
|
||||
"statusBarItem.remoteForeground": "#e7e7e7",
|
||||
"titleBar.activeBackground": "#4a727e",
|
||||
"titleBar.activeBackground": "#363887",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#4a727e99",
|
||||
"titleBar.inactiveBackground": "#36388799",
|
||||
"titleBar.inactiveForeground": "#e7e7e799",
|
||||
"commandCenter.border": "#e7e7e799"
|
||||
},
|
||||
"peacock.color": "#4a727e",
|
||||
"peacock.color": "#363887",
|
||||
"cSpell.enabled": false
|
||||
}
|
2
Adaptation/.vscode/tasks.json
vendored
2
Adaptation/.vscode/tasks.json
vendored
@ -57,7 +57,7 @@
|
||||
{
|
||||
"label": "File-Folder-Helper AOT s M .Kanbn Tasks",
|
||||
"type": "shell",
|
||||
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s M T:/MET08AWCT/06_SourceCode/MET08AWCT/Adaptation -s T:/MET08AWCT/06_SourceCode/MET08AWCT/Adaptation/.kanbn/tasks",
|
||||
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M T:/MET08AWCT/06_SourceCode/MET08AWCT/Adaptation -s T:/MET08AWCT/06_SourceCode/MET08AWCT/Adaptation/.kanbn/tasks",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
|
@ -571,16 +571,99 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
internal static List<string> GetDirectoryNames(string directory)
|
||||
{
|
||||
#nullable enable
|
||||
List<string> results = new();
|
||||
string? fileName;
|
||||
string? checkDirectory = directory;
|
||||
string? pathRoot = Path.GetPathRoot(directory);
|
||||
string extension = Path.GetExtension(directory);
|
||||
if (string.IsNullOrEmpty(pathRoot))
|
||||
throw new NullReferenceException(nameof(pathRoot));
|
||||
if (Directory.Exists(directory))
|
||||
{
|
||||
fileName = Path.GetFileName(directory);
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
results.Add(fileName);
|
||||
}
|
||||
else if ((string.IsNullOrEmpty(extension) || extension.Length > 3) && !File.Exists(directory))
|
||||
{
|
||||
fileName = Path.GetFileName(directory);
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
results.Add(fileName);
|
||||
}
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == pathRoot)
|
||||
break;
|
||||
fileName = Path.GetFileName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
continue;
|
||||
results.Add(fileName);
|
||||
}
|
||||
results.Add(pathRoot);
|
||||
results.Reverse();
|
||||
return results;
|
||||
#nullable disable
|
||||
}
|
||||
|
||||
private string GetJobIdDirectory(string path)
|
||||
{
|
||||
string result;
|
||||
List<string> directoryNames = GetDirectoryNames(path);
|
||||
if (!directoryNames.Contains(_Logistics.JobID))
|
||||
result = Path.GetDirectoryName(path);
|
||||
else
|
||||
{
|
||||
result = string.Empty;
|
||||
foreach (string directoryName in directoryNames)
|
||||
{
|
||||
result = Path.Combine(result, directoryName);
|
||||
if (directoryName == _Logistics.JobID)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void DeleteEmptyTopDirectories(string rootDirectory)
|
||||
{
|
||||
if (Directory.Exists(rootDirectory))
|
||||
{
|
||||
string[] files;
|
||||
string[] directories;
|
||||
string[] subDirectories = Directory.GetDirectories(rootDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
foreach (string subDirectory in subDirectories)
|
||||
{
|
||||
files = Directory.GetFiles(subDirectory, "*", SearchOption.AllDirectories);
|
||||
if (files.Length > 0)
|
||||
continue;
|
||||
directories = Directory.GetDirectories(subDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
if (directories.Length > 0)
|
||||
continue;
|
||||
try
|
||||
{ Directory.Delete(subDirectory); }
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
new DirectoryInfo(subDirectory).Attributes = FileAttributes.Normal;
|
||||
Directory.Delete(subDirectory);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Shared1811(string to, FileInfo sourceFile)
|
||||
{
|
||||
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
|
||||
{
|
||||
string directoryName = Path.GetFileName(to);
|
||||
string jobIdDirectory = Path.GetDirectoryName(to);
|
||||
string jobIdDirectory = GetJobIdDirectory(to);
|
||||
DateTime dateTime = DateTime.Now.AddMinutes(-15);
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||
string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName);
|
||||
string destinationDirectory = Path.Combine(jobIdDirectory, "_ Ignore 100 bytes", weekDirectory, directoryName);
|
||||
if (!Directory.Exists(destinationDirectory))
|
||||
_ = Directory.CreateDirectory(destinationDirectory);
|
||||
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
|
||||
@ -605,6 +688,7 @@ public class FileRead : Properties.IFileRead
|
||||
}
|
||||
}
|
||||
catch (Exception) { throw; }
|
||||
DeleteEmptyTopDirectories(jobIdDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ public enum Test
|
||||
CandelaPSL = 38,
|
||||
CandelaVerify = 37,
|
||||
CDE = 24,
|
||||
Climatec = 54, //Largest
|
||||
CV = 3,
|
||||
DailyRPMAverage = 19,
|
||||
DailyRPMPLRatio = 20,
|
||||
@ -38,7 +39,7 @@ public enum Test
|
||||
RPMPLRatio = 17,
|
||||
RPMXY = 15,
|
||||
SP1 = 8,
|
||||
SRP2100 = 53, //Largest
|
||||
SRP2100 = 53,
|
||||
Tencor = 7,
|
||||
UV = 35,
|
||||
VerificationLehighton = 14,
|
||||
|
@ -18,7 +18,7 @@ public class WC6INCH1_EQPT : EAFLoggingUnitTesting
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static WC6INCH1_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static WC6INCH1_EQPT() => DummyRoot = @"\\messdv002.na.infineon.com\Candela\EC_Characterization_Si\Dummy";
|
||||
static WC6INCH1_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||
|
||||
public WC6INCH1_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{54729740-EA41-4EDC-9730-3C2690A289D2}</ProjectGuid>
|
||||
<ProjectGuid>{30B8F054-382B-42D6-8D06-FDE42B0BB4A7}</ProjectGuid>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
|
Loading…
x
Reference in New Issue
Block a user